-
Notifications
You must be signed in to change notification settings - Fork 68
[FIX] dashboard: properly handle grid resize in dashboard mode #7404
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
base: saas-18.4
Are you sure you want to change the base?
Conversation
|
if I understand the issue correctly, we miss the actual computation of the spreadsheet width when in dashboard mode. have you looked into a way to correct that as well? because right now we have a discrepency between the canvas size and the actual part displayed to the client and I'm not sure that just hiding it is the best solution (maybe it's too complicated to fix and it's the right call, but i'm curious to know if looked into it) |
327e1bc to
4650b73
Compare
361261b to
d525807
Compare
|
|
||
| onGridResized({ height, width }: DOMDimension) { | ||
| onGridResized() { | ||
| const { height, width } = this.props.getGridSize(); |
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.
I guess we could go a bit further and make a helper because those lines are a repetition of the computation in get gridContainer() ;-)
Before this commit: - The canvas size was computed from the grid, which caused visible white margins after a snappy resize (commit 3c8df4b). - Some unused props were being passed, creating unnecessary code clutter. After this commit: - The dashboard canvas size is now computed as the min of the grid bounds and the end of getColDimension. - Shows only visible parts and avoids extra canvas processing. Task: 5223156
d525807 to
6982b97
Compare

Description:
Current behavior before PR:
after a snappy resize (commit 3c8df4b9).
Desired behavior after PR is merged:
visible parts are displayed and avoiding redundant canvas computations.
Task: 5223156
review checklist