-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add virtualization in sites table #1054
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.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@K-Markopoulos you can click here to see the review status or cancel the code review job.
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.
PullRequest Breakdown
Reviewable lines of change
+ 463
- 322
55% TSX
44% Jest Snapshot (tests)
1% TSX (tests)
<1% JSON
<1% TypeScript
Generated lines of change
+ 27
- 0
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
Build succeeded and deployed at https://aqualink-app-1054.surge.sh |
Nice work!
|
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 work, no merge blocking issues found. Well commented code. Added a couple comments about possible (minor) issues.
Reviewed with ❤️ by PullRequest
|
||
/** | ||
* Displays a virtualized list as table with optional header and footer. | ||
* It basically accepts all of the same params as the original FixedSizeList. |
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.
const handleClick = (event: unknown, site: Row) => { | ||
setSelectedRow(site.tableData.id); | ||
const mapElement = document.getElementById('sites-map'); |
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.
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.
Indeed, I'm making the change.
@@ -288,28 +336,30 @@ | |||
}, | |||
}, | |||
tableRow: { | |||
position: 'static !important' as 'static', | |||
cursor: 'pointer', | |||
borderTop: `1px solid ${theme.palette.grey['300']}`, | |||
}, | |||
}); | |||
|
|||
type SiteTableBodyIncomingProps = { |
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.
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.
Right, nice catch 🎣 !
|
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.
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.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@K-Markopoulos you can click here to see the review status or cancel the code review job.
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.
✖️ This code review was cancelled. See Details
Closing for now in favor of pagination but let's keep this in mind ! |
The goal is to improve the performance of the sites table in
/map
route, by adding virtualization. Currently we do not paginate the sites and when we fetch a few thousands sites, the UI is slow and may freeze.react-window
package which handles virtualization.VirtualTable
component "forked" from this sandbox, asreact-window
only works for lists and we need to make it work with tables.SiteTableBody
->SiteTable
, it now renders both header (received from props) and body.SiteTable
->SiteTableContainer