Skip to content
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

Conversation

jansav
Copy link
Contributor

@jansav jansav commented Jan 19, 2022

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.

@jansav jansav added the bug Something isn't working label Jan 19, 2022
@jansav jansav added this to the 5.4.0 milestone Jan 19, 2022
@jansav jansav requested a review from a team as a code owner January 19, 2022 13:49
@jansav jansav requested review from jakolehm and Iku-turso and removed request for a team January 19, 2022 13:49
@jansav jansav force-pushed the fix/involuntary-rerenders-in-item-list-layout branch from 2b6fab5 to 0871857 Compare January 19, 2022 13:50
ixrock
ixrock previously approved these changes Jan 21, 2022
Copy link
Contributor

@ixrock ixrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ixrock
Copy link
Contributor

ixrock commented Jan 21, 2022

One other thing what I don't really like is too much nesting in codebase (besides too much bloated amount of files): src/renderer/components/item-object-list/item-list-layout-content/item-list-layout-content.tsx

Could we keep more flat in src/renderer/components/item-object-list/item-*.tsx?
Also would be nice to have whole bundle of inner components available at src/renderer/components/item-object-list/index.ts

Base automatically changed from fix/release-details to master January 21, 2022 14:29
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@jansav jansav force-pushed the fix/involuntary-rerenders-in-item-list-layout branch from d3e4fde to 0b630a8 Compare January 21, 2022 14:48
@github-actions
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Iku-turso
Iku-turso previously approved these changes Jan 21, 2022
@jim-docker
Copy link
Contributor

jim-docker commented Jan 21, 2022

Just noticed this, not sure if this PR is the source of this bug:

Screen.Recording.2022-01-21.at.11.44.51.AM.mov

It should select all/select none. Other uses of item-list-layout are ok.

**** confirmed this is happening on master too. Made issue #4740 and PR #4742 ****

@jim-docker
Copy link
Contributor

item/filtered count is missing (between Pods title and namespace selector):
Screen Shot 2022-01-21 at 12 07 10 PM

@jim-docker
Copy link
Contributor

jim-docker commented Jan 21, 2022

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)

Nokel81
Nokel81 previously approved these changes Jan 25, 2022
jim-docker
jim-docker previously approved these changes Jan 25, 2022
Copy link
Contributor

@jim-docker jim-docker left a 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

@Nokel81 Nokel81 dismissed stale reviews from jim-docker and themself via 81628f8 January 26, 2022 20:51
jansav and others added 6 commits January 27, 2022 09:30
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 force-pushed the fix/involuntary-rerenders-in-item-list-layout branch from 81628f8 to cf033ad Compare January 27, 2022 14:30
@Nokel81 Nokel81 changed the base branch from master to fix-docks-dependency-heirarchy January 27, 2022 14:30
@jansav jansav merged commit 5114657 into fix-docks-dependency-heirarchy Jan 31, 2022
@jansav jansav deleted the fix/involuntary-rerenders-in-item-list-layout branch January 31, 2022 06:38
Nokel81 added a commit that referenced this pull request Jan 31, 2022
* Fix involuntary re-renders in item list layout

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Enable skipped integration tests for being fixed

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove comment

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Improve code style

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* flatten file heirarchy

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix item list layout header rendering bug

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Co-authored-by: Sebastian Malton <sebastian@malton.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Namespace Selector is closed when trying to multiselect
5 participants