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

Remember collapsed state of object behaviors #5641

Merged
merged 6 commits into from
Sep 7, 2023
Merged

Conversation

AlexandreSi
Copy link
Collaborator

@AlexandreSi AlexandreSi commented Sep 7, 2023

Resolves #5562
I checked no extension has a behavior with a property folded. => not necessary anymore since we don't save the collapsed state in the project
As discussed together, the collapsed state is not saved in the project to avoid polluting the behavior state with a UI consideration.
So each time the project is reopened, behavior panels will be uncollapsed.

@AlexandreSi AlexandreSi enabled auto-merge (squash) September 7, 2023 12:06
Comment on lines 107 to 112
React.useEffect(
() => {
behavior.setFolded(!expanded);
},
[expanded, behavior]
);
Copy link
Owner

Choose a reason for hiding this comment

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

Why do you need this effect and a state? Why not using behavior.isFolded()/behavior.setFolded (and a forceUpdate when you update it)?

@AlexandreSi AlexandreSi merged commit 18211d1 into master Sep 7, 2023
6 of 7 checks passed
@AlexandreSi AlexandreSi deleted the fold-behaviors branch September 7, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remember collapsed state of object behaviors
2 participants