New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table Groups & Standalone Delta Component #1761
Conversation
🦋 Changeset detectedLatest commit: 993c60a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for evidence-development-workspace ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@ItsMeBrianD @csjh I've refactored quite a lot of this into smaller components and ripped out as much CSS as I could. There's still duplication in a few places, but I think when we USQL-ify this component we'll have a good opportunity to decide what the right long-term structure should be. Some challenges I ran into:
|
❌ Deploy Preview for evidence-docs failed. Why did it fail? →
|
Paused this due to some performance issues showing up when putting a large query (>100k rows) into DataTable. Initially thought this was due to the new component structure (having a When this is included, in combo with the TableCell component, it generates a TableCell for every cell in the query (which in my test query was 1.5 million cells). When this code is removed, TableCells are only generated for the visible cells in the table (150 in my test query):
|
@csjh in the code snippet above, what's the purpose of the |
No, |
It shouldn't work any different than <DataTable rows={some_number}>
<Column {...some_column_props} />
</DataTable> which is why I'm confused how it would suddenly generate a million |
Ah got it, so maybe it should be |
I don't think so, that would slow down the modal opening quite a bit How were you testing how many times it rendered? A global variable? |
I just put a console log in the TableCell component. I got 1.5M logs on page load, then a pause, then 150 logs. Then when clicking full screen I got 450 logs after commenting out that section I got 150 logs on page load |
Hmm OK, it's probably the DataTable accidentally being run recursively somehow, thanks |
Ahh this was funny, it was because during SSR and initial render the |
Oh wow, nice find! |
❌ Deploy Preview for evidence-test-env failed. Why did it fail? →
|
Table Groups
Adds groups to DataTable. Groups can either be
accordion
orsection
. For now, this is limited to one level of groups, but will be expanded to allow nested groups in future versions.subtotals
are generated using the supplied groups from thegroupBy
prop and can be configured in the same way as the total row - using thetotalAgg
prop within eachColumn
Accordion
Section
Standalone Delta Component
This PR also adds a standalone Delta component which can be used in the same way the Value component is used.
Symbol Position
symbolPosition
(right
is default, seeleft
below):Chip
chip=true
formats the Delta with a background and border:Neutral Range
Inspired by this Twitter thread: https://twitter.com/archieemwood/status/1762286734845653103
Allows you to set a range for neutral values using
neutralMin
andneutralMax
. Values appear in grey with a dash instead of an arrow:Checklist