-
Notifications
You must be signed in to change notification settings - Fork 77
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(datagrid): optimise layout rendering #1346
Conversation
👋 @dtsanevmw,
Thank you, 🤖 Clarity Release Bot |
This PR introduces visual changes: bb7a261
|
e323b4c
to
cec3051
Compare
This PR introduces visual changes: 20d8185
|
1747eb3
to
009c48d
Compare
This PR introduces visual changes: 339d4ce
|
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.
Check my comments.
009c48d
to
9653ffc
Compare
This PR introduces visual changes: 1868bc5
|
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. I will need some more time for a deeper review.
Posting some observations which we already discussed offline, but we want to have them logged in the PR.
b365a99
to
2cd3aeb
Compare
This PR introduces visual changes: d9d984b
|
3c1ecd7
to
115688e
Compare
This PR introduces visual changes: 931dcf2
|
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.
LGTM
feb318b
to
cb1c20d
Compare
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-16.x 16.x
# Navigate to the new working tree
cd .worktrees/backport-16.x
# Create a new branch
git switch --create backport-1346-to-16.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ac0d4cf1c8b6f9a9dc32ccc5b4b4f5445d49b781
# Push it to GitHub
git push --set-upstream origin backport-1346-to-16.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-16.x Then, create a pull request where the |
Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [ ] Bugfix - [X] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: - When computing header widths we get each header boundingClientRect and update the width separately which creates multiple reflows and slow us down. - Cells and Headers are listening for changes and holding column states. - Calculating userDefinedWidth triggers reflow each time when accessing getBoundingClientRect. - Expandable animation cycle is triggered as being changed initially which trigger setStyle. <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Issue Number: CDE-1743 - All the widths are batched before traversing trough headers and their width being set. - Main renderer is handling the state listening and pass the changes to cells and headers to update. - We clone the target element before we calculate boundingClientRect outside the grid so we don't trigger reflow of the whole grid and just receive measurements for that specific element. - We set the expanded state to null to skip the animation cycle on initial load. - [ ] Yes - [X] No <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> --------- Co-authored-by: GitHub <noreply@github.com>
Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [ ] Bugfix - [X] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: - When computing header widths we get each header boundingClientRect and update the width separately which creates multiple reflows and slow us down. - Cells and Headers are listening for changes and holding column states. - Calculating userDefinedWidth triggers reflow each time when accessing getBoundingClientRect. - Expandable animation cycle is triggered as being changed initially which trigger setStyle. <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Issue Number: CDE-1743 - All the widths are batched before traversing trough headers and their width being set. - Main renderer is handling the state listening and pass the changes to cells and headers to update. - We clone the target element before we calculate boundingClientRect outside the grid so we don't trigger reflow of the whole grid and just receive measurements for that specific element. - We set the expanded state to null to skip the animation cycle on initial load. - [ ] Yes - [X] No <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> --------- Co-authored-by: GitHub <noreply@github.com>
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed PRs after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: CDE-1743
What is the new behavior?
Does this PR introduce a breaking change?
Other information