-
Notifications
You must be signed in to change notification settings - Fork 619
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(admin-ui): DataTable + Skeleton components #4489
base: feat/new-admin-ui
Are you sure you want to change the base?
Conversation
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.
First look over the PR, looks good. Was expecting it to be more complex initially hehe.
Besides the code review, here are just a couple of extra notes / questions.
1. Backlog - Resetting Sorters
Right now, the moment you click on a column, the sorter is applied. Cool.
If I click again on it, a reverse sorter is applied. Also cool.
Now, the third time I click, I would expect for the sorter to be dismissed. But what happens is the sorter again gets reversed.
This is most probably outside of the scope for this PR (it always worked like this), but I'd maybe still backlog this?
2. Backlog - Which Columns Are Sortable?
In the future, maybe we can see how to signal to the user which columns are sortable and which aren't. Just so the user does not need to hover over columns, and figure it out by just looking at the cursor. Maybe we check with Kreso?
3. Page Builder Issue
There's a bug here. If I open Page Builder (list of pages view), I get:
4. Backlog - Column Resizing UX
For me at least, the column resizing UX is good, but not the best.
It's fine when I resize the far left column, because the right ones just keep moving left/right as I'm doing it.
But when I resize a column in the middle, then, instead of just the right columns, the left columns also resize (shrink in their width).
Feels weird to me.
I believe you had a resizing-related chat with Kreso, and I saw he mentioned Notion. I tried column resizing in Notion, and for me that felt much better.
But yeah... the title of this point does mention "Backlog", so for now, I'd just backlog this and move on with higher P stuff.
<div className={cn(resizerVariants({ isResizing }), className)} {...props} /> | ||
); | ||
|
||
export { Resizer, ResizerProps }; |
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.
export { Resizer, ResizerProps }; | |
export { Resizer, type ResizerProps }; |
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.
Did not go yet into details, but the first think I noticed is a solid amount of code in this file. Let's maybe extract some of the code (where possible) into separate files?
Changes
This PR introduces two new components and improves many others.
Skeleton
The
Skeleton
component displays the loading state throughout the admin app. It follows the shadcn/ui specifications and may be updated as we await the final designs.The previous Skeleton component used the
react-loading-skeleton
package, now removed.Table + DataTable
These two components are used to display data across multiple admin app views. The
Table
component provides the backbone components and is used internally byDataTable
, which handles data and column definitions.The
DataTable
component will receive improvements in the future, migrating it to a first-test architecture approach.Other improvements
Checkbox
Integrating the
Checkbox
component within theDataTable
revealed several enhancements:DropdownMenu
component, its size and color were slightly odd.checked
andindeterminate
.How Has This Been Tested?
Jest + Manual