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

Expanding/collapsing a node in the Explorer re-renders the whole workbench #3595

Open
pcdavid opened this issue Jun 7, 2024 · 1 comment · Fixed by #3596
Open

Expanding/collapsing a node in the Explorer re-renders the whole workbench #3595

pcdavid opened this issue Jun 7, 2024 · 1 comment · Fixed by #3596

Comments

@pcdavid
Copy link
Member

pcdavid commented Jun 7, 2024

This is particularly visible when a large diagram is opened.

  1. Open a project with two diagrams, one small (S) and one big (B).
  2. Open S, select a element in the explorer.
  3. Expand/collapse the element in the explorer, not changing the selection. The effect is immediate.
  4. Open B instead of S, and repeat step 3, expanding/collapsing the same element. It is now very slow.

There is no actual selection change, but since SelectionContextProvider's setSelection does not check that it calls setState with a new selection objet structurally equivalent but different in terms of identity. Now that the selection context is high in the component hierarchy, this re-renders the whole workbench, including the big diagram.

The solution is the same as in d995d6e: update the selection state if the key is new value is really structurally different from the previous one.

@pcdavid pcdavid added this to the 2024.7.0 milestone Jun 7, 2024
@pcdavid pcdavid self-assigned this Jun 7, 2024
pcdavid added a commit that referenced this issue Jun 7, 2024
@pcdavid pcdavid linked a pull request Jun 7, 2024 that will close this issue
39 tasks
sbegaudeau pushed a commit that referenced this issue Jun 10, 2024
sbegaudeau pushed a commit that referenced this issue Jun 10, 2024
sbegaudeau pushed a commit that referenced this issue Jun 10, 2024
sbegaudeau pushed a commit that referenced this issue Jun 10, 2024
@AxelRICHARD
Copy link
Contributor

This issue is reopened because the corresponding commit has been reverted by #3646

@AxelRICHARD AxelRICHARD reopened this Jun 20, 2024
@sbegaudeau sbegaudeau removed this from the 2024.7.0 milestone Jul 10, 2024
theogiraudet pushed a commit to mbats/Interactivity that referenced this issue Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants