Show HN: React Spreadsheet 2
rowsncolumns.app
rowsncolumns.app
I would say that the spreadsheet-like data view is a must-do in the career of the UI person. But then this all, without proper back-end wired to it, means very little to the overall product experience. In fact - proper back-end with not-so-cool UI may deliver quite the experience...
In my view, a UI component should not be constrained or reliant on a specific back-end language.
Declaratively render cells, embed external content, use custom formulas, collaborate with other users all using composable ReactJS UI components.
We offer support for keyboard shortcuts and navigation, and our platform is natively compatible with both light and dark modes.
We also provide the option for developers to customise themes, ensuring optimal accessibility for users with low/tunnel vision.
I once wrote a React app with was essentially a spreadsheet view, except each sheet was a "table", and tables could be related to one another via columns which were belongs to/has many types.
Writing the front end and back end for this was one of the most complicated things I've ever worked on. I'd love to try it again at my current stage of knowledge and experience.
So yeah, I don't know who would be the target, probably very niche.
duplicate capture group name in regular expression
I find that if I refrain from editing the contents of cells, then this crash doesn't occur, and I can see lots of people modify stuff in real-time. I can play with everything but the contents of a cell, otherwise I get a crash.Overall cool demo
SyntaxError: Invalid regular expression: /^(?<year>\d{4})(\-)(?<month>\d{1,2})(\-)(?<year>\d{1,2})T(?<hour>\d{1,2})\:(?<minute>\d{1,2})\:(?<second>\d{1,2})(Z?)$/i: Duplicate capture group name
This happens whenever I insert text to any cell. I just tried inserting "TEST" to a cell on the first sheet, then pushed the Enter key. It also happens when I use arrow keys to move away from a cell I am editing.Does the error go away if you just refresh the demo?
I am building something that would probably benefit from this, but with that price tag (solo indy dev) that's going to be a big ask! might be worth it, just no way of knowing without trying it first
Personally I found canvas easier to work with, scroll performance was better, less browser bugs, drawing was cheaper and scales for large content (using virtualisation or multiple canvas layers)
You can try single user mode here - https://www.rowsncolumns.app/demo?collab=false
139-d48f98f3a9d41491.js:1 TypeError: Cannot read properties of undefined (reading 'rowCount')
at nI (561-5e048c82ab8ff4d8.js:5:68277)
at e (452-22edc4adb41de58f.js:1:1090692)
at rs (2443530c-0641256dae818679.js:9:38883)
at lg (2443530c-0641256dae818679.js:9:54218)Application error: a client-side exception has occurred (see the browser console for more information).
And from console:
139-d48f98f3a9d41491.js:1 TypeError: Cannot destructure property 'sheetId' of
'.for' as it is undefined.
at 561-5e048c82ab8ff4d8.js:5:60688
at Object.rQ [as useMemo] (2443530c-0641256dae818679.js:9:43805)
at t.useMemo (139-d48f98f3a9d41491.js:17:7340)
at nv (561-5e048c82ab8ff4d8.js:5:60642)
at nI (561-5e048c82ab8ff4d8.js:5:68802)
at e (452-22edc4adb41de58f.js:1:1090692)
at rs (2443530c-0641256dae818679.js:9:38883)
at lg (2443530c-0641256dae818679.js:9:54218)
at iv (2443530c-0641256dae818679.js:9:112640)
at oR (2443530c-0641256dae818679.js:9:90032)Thanks for the report :)
We are agnostic to back-end frameworks. Some users have used Prisma + Graphql, NoSQL databases etc.
The Sheet data structure on the UI can be flexible too. It can come from streaming data source, lazily loaded on-demand or all stored in browser memory
React and Konva provides a Profiler and Devtools to measure performance and to prevent any un-necessary re-renders.
We also measure the Canvas FPS to make sure rendering is at max 60fps. The bottleneck we have identified is with scrolling large amounts of text, especially in large 42 inch 4K monitors, where FPS limits to 55-60fps. We do have some workaround planned for large monitors, by splitting the canvas into 4 layers.
In terms of regression, we use Cypress for most e2e testing, but the test cases are small as of now.
Slight degradation on Dell 42" 4K, could be because of the ppi or the pixel ratio, which might be causing canvas/row/cell/ dimensions to be not rounded to whole numbers (this can affect perf).
We start of with the FPS monitoring tool which measure the frame rate, memory consumption and GPU sange
We switch to devtools->Performance analysis to measure function call times, layout thrashes and shifts, RAF bottleneck, memory consumption and CPU time.
We also use React devtools to measure re-rendering.
Scrolling is wrapped in Request animation frame loop, hence its being controlled by the browsers frame rate.
At 42" 4k, there's probably no scaling, so more stuff fits on the screen.
Spreadsheet uses virtualisation to display data, ie only data viewable in a Row x Column viewport is displayed. This improves rendering performance.
Data performance can be improved by 1. Lazy loading data or Infinite scrolling. We have a built-in async hook that does this. 2. Only save pointers to data that is being displayed. So if you have 1M rows, on the JavaScript side, you only load 100 rows in memory and when user scrolls, you can replace this rows with new data. This will make the browser happy. 3. Streaming data from the server similar to google sheets.
But to answer your question, we have a Max row limit of 1_048_576 and max column limit of 16_384
Props for the fact that when I scroll a bit faster things don't disappear, which I've seen before in SPAs with infinite scroll.
Prepares LART.
A funny problem I had a few years back was a company with users keeping 200 meg+ Excels sheet on their desktops. It took them forever to log off every day because the profile was copied back to the server.
To give an example of what makes it so difficult: Some browsers (e.g. Chrome) seem to have special optimizations for rendering tables. So performance-wise it makes a difference if you use table-tr-td-tags or div-tags within your DOM.
what are "escape hatches"?
Thank you
Github: https://github.com/ticruz38/svelte-sheets
Demo: https://ticruz38.github.io/svelte-sheets
It doesn't have the collaborative functionality as React Spreadsheet 2, but other than that it looks comparable.
Commercial / open-core are a no-go for me, since my goal is to integrate it into an open source project.
At which address? You're not listing an email on your profile
Shame.
Application error: a client-side exception has occurred (see the browser console for more information).
Then again, I guess you need only one enterprise using this thing in all their apps.
Pleasantly surprised to see conspiracies about Tupac and 'vue gang' take over the sheet instead :)