feat: Paginated Tables for Resource List Views#602
feat: Paginated Tables for Resource List Views#602maxgurewitz merged 25 commits intodittofeed:mainfrom
Conversation
|
Hi! |
|
Hi @Wr4th100! Congrats on the PR! Excited to start digging into it.
|
|
Hi @maxgurewitz! I have made the respective changes. Please have a look. |
|
@Wr4th100 looking! |
|
I have made the requested changes @maxgurewitz, please have a look! |
|
@Wr4th100 looking! |
maxgurewitz
left a comment
There was a problem hiding this comment.
Can you fix linting by running yarn workspace dashboard lint --fix and yarn workspace backend-lib lint --fix.
Yeah sure, done! |
There was a problem hiding this comment.
Borders
Apologies for the late response! It looks like several of the paginated tables have black borders, but the templates do not. I prefer the look of the table without those borders, if you could please remove them!
Table Row Count
Can you make use of the autoPageSize option to ensure that the table expands to full height of the page?
https://mui.com/x/react-data-grid/pagination/#automatic-page-size
Recording Reminder
Finally, a reminder to post a screen recording of the tables' UX! Thank you!
maxgurewitz
left a comment
There was a problem hiding this comment.
A few more requested changes!
|
I have made the requested changes. Please have a look! Also, the video for the tables' UX: DittofeedVid.mp4 |
maxgurewitz
left a comment
There was a problem hiding this comment.
So worked it out by just removing the maxHeight property. The table automatically resizes to screen size.
To clarify, the goal is to have the number of rows also adjust to fit the screen size so if the screen is larger, more rows are rendered. However, looking at timestamp 1:04 of your recording above, I see that the page size is 5, despite there being 9 results, and room to show more.
Also, should I make the tables expand up to the screen width?
Yes please!
maxgurewitz
left a comment
There was a problem hiding this comment.
Hi @Wr4th100 a few more changes are required.
| key={journey} | ||
| onClick={(e) => { | ||
| e.stopPropagation(); | ||
| router.push({ |
There was a problem hiding this comment.
A few things need here:
- Rather than a button that uses the router to navigate, can you use a nextjs link?
- Can you style the link so that it has max character limit for journeys with long names, with a "..." appended to the end, and wrapped in a
<Tooltip>with the full name. - Can you style the link so that it has a light grey background color, so that it's clearly distinguishable from neighboring links?
This feedback is applicable to the other page's related resources columns as well.
|
Apologies for the late updates. I have made the required changes. Please have a look! |
|
Hi apologies @Wr4th100 I totally missed that you had made additional changes, will re-review today! |
maxgurewitz
left a comment
There was a problem hiding this comment.
@Wr4th100 here's a video recording with some additional feedback.
https://www.loom.com/share/0f63abbb8dd04c34af1cbfad7709e271?sid=5948fa65-faf8-4b35-bc25-3e8ac1bf384a
Sorry went offline for a few days, will be looking into it! |
|
@Wr4th100 this is rising in priority, if you're not able to work on this, I'm going to have to ask someone else to take it over! |
…4th100/paginated-tables
Apologies @maxgurewitz, I have had some health issues in the past few weeks. I have made the required changes but there are some few issues... Regarding that table scroll, So, I have changed the "Used By" columns to dropdowns which displays the templates/journeys concisely. DrppDownVideo.mp4Please let me know if this is ok. If not, I would love to have some guidance on how to use that old UI itself. |
I'm sorry to hear that! Please let me know if there's anything I can do to help.
Great idea! I love it. Looks like you still have some linting errors here. Beyond that, I will try to give a full re-review by EOD! |
| }} | ||
| getRowId={(row) => row.id} | ||
| onRowClick={(params) => { | ||
| router.push({ |
There was a problem hiding this comment.
Please use <Link>'s here instead of router.push!
There was a problem hiding this comment.
There is no direct way to wrap the entire row inside a <Link> tag. I would need to put the Link tag in every cell's renderCell property. Is that the right way to do it?
There was a problem hiding this comment.
hey @Wr4th100 yah, you can put it inside of the renderCell of the baseColumn. apologies for not responding sooner. I missed this comment!
| }} | ||
| getRowId={(row) => row.id} | ||
| onRowClick={(params) => { | ||
| router.push({ |
| }} | ||
| getRowId={(row) => row.id} | ||
| onRowClick={(params) => { | ||
| router.push({ |
There was a problem hiding this comment.
Please use <Link/> instead of router.push
| }} | ||
| getRowId={(row) => row.id} | ||
| onRowClick={(params) => { | ||
| router.push({ |
There was a problem hiding this comment.
Please use <Link> instead of router.push
| }} | ||
| getRowId={(row) => row.id} | ||
| onRowClick={(params) => { | ||
| router.push({ |
There was a problem hiding this comment.
Please use <Link/> instead of router.push.
| sx={{ | ||
| height: "100%", | ||
| width: "100%", | ||
| ".MuiDataGrid-row:first-child": { |
There was a problem hiding this comment.
You seem to be re-using the same styles over and over. Can you deduplicate this code?
There was a problem hiding this comment.
Ok sure, shall I use this code to override the theme for DataGrid in themeCustomization?
There was a problem hiding this comment.
How about you just export a value from a shared components/resourceTable.tsx file
const RESOURCE_TABLE_STYLE: SxProps<Theme> = {
...
}and then use it
<DataGrid sx={{...RESOURCE_TABLE_STYLE, myStyle1: 1 }} >There was a problem hiding this comment.
Ok sure, will do it!
|
Other than small fixes requested, looks amazing! Just ran it locally on my machine and its working great! Thanks for your patience @Wr4th100 |
|
@maxgurewitz I have made the changes. Please have a look! |
|
@Wr4th100 looking! |
maxgurewitz
left a comment
There was a problem hiding this comment.
Amazing looks good to me!
Please fix the api test error and it's ready to merge!
Done. Please have a look! |
|
/tip $50 |
|
🎉🎈 @Wr4th100 has been awarded $50! 🎈🎊 |
|
@Wr4th100 you should join our discord, I'd like to give you a shoutout! |

Added 5 Paginated Tables.
Fixes #583
/claim #583