Repository navigation
ref: #597 - Flags Table Refactor Part 3 - #2714
Conversation
| { | ||
| node: { | ||
| name: 'flag1', | ||
| name: 'flagA', |
There was a problem hiding this comment.
renamed these to test the sorting functionality
| (measurements.length > 0 && measurements.every(({ avg }) => avg === null)) | ||
|
|
||
| function TableSparkline({ measurements, change, name }) { | ||
| export type TableSparklineProps = { |
There was a problem hiding this comment.
These are just the propType props, but written with TS
| : SortingDirection.ASC | ||
|
|
||
| const useMeasurementVariables = (historicalTrend, oldestCommitAt) => { | ||
| const createMeasurementVariables = (historicalTrend, oldestCommitAt) => { |
There was a problem hiding this comment.
renamed from "use" since it's not actually a hook
| @@ -1,5 +1,24 @@ | |||
| td { | |||
| .tableui table { | |||
There was a problem hiding this comment.
Some style overrides I needed to do in order to get the styles to play nicely for the nested table
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #2714 +/- ##
==========================================
- Coverage 98.44% 98.42% -0.02%
==========================================
Files 855 855
Lines 11990 12019 +29
Branches 3115 3178 +63
==========================================
+ Hits 11803 11830 +27
- Misses 184 185 +1
- Partials 3 4 +1
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2714 +/- ##
==========================================
- Coverage 98.44% 98.42% -0.02%
==========================================
Files 855 855
Lines 11990 12019 +29
Branches 3115 3159 +44
==========================================
+ Hits 11803 11830 +27
- Misses 184 185 +1
- Partials 3 4 +1
Continue to review full report in Codecov by Sentry.
|
My only concern with this, is that the flags are paginated iirc, so when sorting you won't actually be sorting all of the flags because some will be hidden on the API/DB side of things. Wondering also, if you're able to add in infinite scroll replacing the "Load More" button. That is something else we're trying to do while we're refactoring these tables. |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found Additional details and impacted files@@ Coverage Diff @@
## main #2714 +/- ##
=======================================
- Coverage 98.44 98.43 -0.01
=======================================
Files 855 855
Lines 11990 12019 +29
Branches 3160 3178 +18
=======================================
+ Hits 11803 11830 +27
- Misses 184 185 +1
- Partials 3 4 +1
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will increase total bundle size by 4.81kB ⬆️
|
Bundle ReportChanges will increase total bundle size by 4.81kB ⬆️
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
Codecov ReportAttention:
@@ Coverage Diff @@
## main #2714 +/- ##
==========================================
- Coverage 98.44% 98.42% -0.02%
==========================================
Files 855 855
Lines 11990 12019 +29
Branches 3113 3178 +65
==========================================
+ Hits 11803 11830 +27
- Misses 184 185 +1
- Partials 3 4 +1
Continue to review full report in Codecov by Sentry.
|
|
Just a couple little things looking at the preview deploy before diving into the code:
|
|
@nicholas-codecov Thanks for the feedback, added a new video fixing the arrow, row styling and loader styling |
|
Just looking at the current table, the coverage and trend header text should be right aligned not left aligned |
nicholas-codecov
left a comment
There was a problem hiding this comment.
One thing to look at here, and the previous comment
| name: JSX.Element | ||
| coverage: JSX.Element | ||
| trend: JSX.Element | ||
| delete: JSX.Element | null |
There was a problem hiding this comment.
Can you swap these to React.ReactNode as JSX.Element does not allow valid returns such as null, number, etc.
nicholas-codecov
left a comment
There was a problem hiding this comment.
Awesome work, thanks for those changes!


Description
This PR covers refactoring the FlagsTable from the old-ui table to the new pattern. One tricky thing with this particular table was it has a nested table, and after working with @nicholas-codecov, as well as spending ~3 days myself triaging some ghost rerendering issues, we were able to workaround it via Memoizing the table creation using
const Table = memo(Component)Outside of this, I removed the sorting mechanism within the useRepoFlagsTable hook since I think we get it for free without needing to do the additional network calls via the inline sorting functionality from the tanstack table. At least, when working locally that looked to be the case.This file along with the spec has also been converted to TS, with the tableData type being the only missing type, until we find some time to go back and refactor that one which will give us the tableData type for free.
Screenshots
Screen.Recording.2024-03-20.at.9.24.33.AM.mov
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.