-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: HD path filter and patches #602
Conversation
a117a93
to
9370382
Compare
9370382
to
9522223
Compare
// TODO: there should be a filtering for the frontend before the backend | ||
// that frontend filtering should consider the individual tests inside each test batch (the data from individualTestsTables), | ||
// not only the rows of the external table (same for BootsTable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using this approach anymore, we will just preserve the data, add a spinner until the fresh data is retrieved
if (updatePathFilter === undefined) { | ||
table.setGlobalFilter(String(e.target.value)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to set the global filter? since the filter is being added in the backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it is being used for tables such as within the buildDetails page, which doesn't have backend filtering for the page so the frontend filtering is being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, pre-approving, just left some minor improvements
Worked nice on my tests even the commit graph
{/* TODO: remove this hidden div, this is just to force memoization reset when sorting changes (all tables) */} | ||
<div className="hidden">{sorting.toString()}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make TableHead explicitly dependent on sorting
: // the header must change the icon when sorting changes, but just the column dependency won't trigger the rerender, so we pass an unused sorting prop here to force the useMemo dependency | ||
flexRender(header.column.columnDef.header, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break this comments in multiple lines
eea66d0
to
b079e03
Compare
b079e03
to
d428e9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!!
Also refactors the sorting exhaustive-deps useMemo dependency just so eslint can complain if a useMemo dependency is missing
How to test
Go to a tree details page with boot and/or test data, scroll down and use the searchbox alongside the path column. Check the filtering of the table and the commit history graph. Compare this with the previous version currently on staging.
Also go to a hardware details page with boot and/or test data and see the same behavior as in tree details (except for the commit history graph, which isn't implemented yet).
Closes #578 and #582