-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix involuntary rerenders in item list layout #4720
Fix involuntary rerenders in item list layout #4720
Conversation
2b6fab5
to
0871857
Compare
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
src/renderer/components/item-object-list/item-list-layout-content/item-list-layout-content.tsx
Outdated
Show resolved
Hide resolved
src/renderer/components/item-object-list/item-list-layout-content/item-list-layout-content.tsx
Outdated
Show resolved
Hide resolved
src/renderer/components/item-object-list/item-list-layout-content/item-list-layout-content.tsx
Outdated
Show resolved
Hide resolved
...t-list/item-list-layout-header/item-list-layout-header-info/item-list-layout-header-info.tsx
Outdated
Show resolved
Hide resolved
...list/item-list-layout-header/item-list-layout-header-title/item-list-layout-header-title.tsx
Outdated
Show resolved
Hide resolved
src/renderer/components/item-object-list/item-list-layout-content/item-list-layout-content.tsx
Outdated
Show resolved
Hide resolved
One other thing what I don't really like is too much nesting in codebase (besides too much bloated amount of files): Could we keep more flat in |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
d3e4fde
to
0b630a8
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
The list scrolls to top as it rerenders due to changes in the list items (I'm trying to keep it near the bottom, which works on 5.3.x): Screen.Recording.2022-01-21.at.12.51.41.PM.mov**** happens on master too, suspect it is due to #4653. This similar issue is still occurring as well: #4653 (comment) |
a02f376
to
562a052
Compare
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.
will fix #4720 (comment) in separate PR
Co-authored-by: Mikko Aspiala <[email protected]> Signed-off-by: Janne Savolainen <[email protected]>
Co-authored-by: Mikko Aspiala <[email protected]> Signed-off-by: Janne Savolainen <[email protected]>
Signed-off-by: Janne Savolainen <[email protected]>
Signed-off-by: Janne Savolainen <[email protected]>
Signed-off-by: Sebastian Malton <[email protected]>
Signed-off-by: Sebastian Malton <[email protected]>
81628f8
to
cf033ad
Compare
* Fix involuntary re-renders in item list layout Co-authored-by: Mikko Aspiala <[email protected]> Signed-off-by: Janne Savolainen <[email protected]> * Enable skipped integration tests for being fixed Co-authored-by: Mikko Aspiala <[email protected]> Signed-off-by: Janne Savolainen <[email protected]> * Remove comment Signed-off-by: Janne Savolainen <[email protected]> * Improve code style Signed-off-by: Janne Savolainen <[email protected]> * flatten file heirarchy Signed-off-by: Sebastian Malton <[email protected]> * Fix item list layout header rendering bug Signed-off-by: Sebastian Malton <[email protected]> Co-authored-by: Sebastian Malton <[email protected]>
Main attraction here is that
ItemListLayout
has now been split to multiple components to make re-rendering happen more locally instead of full-renders. It's also nice to have a smaller components.The changes here highlight that ItemListLayout is wrong abstraction and should be re-designed.
Closes #4703.
Opening separate issue for proper love for
ItemListLayout
.Note: This PR is built on top of #4710 which should be merged first.