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(files): Ensure renaming state is correctly reset #48425

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 27, 2024

Summary

Problem: Is a node is renamed and the new name is out of the current visible list of nodes the component will be recycled, this means the props will change, so when the onRename functions is about to reset the state the this.source will point to a different node.

To fix this, but also to separate business logic from visual representation, the logic is moved into the renaming store and the component is only responsible for rendering.

Checklist

@susnux
Copy link
Contributor Author

susnux commented Sep 27, 2024

/backport to stable30

@susnux susnux marked this pull request as ready for review October 7, 2024 10:56
@susnux susnux requested a review from skjnldsv as a code owner October 7, 2024 10:56
@susnux susnux requested review from a team, artonge, sorbaugh and Pytal and removed request for a team October 7, 2024 10:57
@susnux
Copy link
Contributor Author

susnux commented Oct 8, 2024

/compile

@susnux susnux enabled auto-merge October 8, 2024 16:42
@skjnldsv skjnldsv added the 4. to release Ready to be released and/or waiting for tests to finish label Oct 15, 2024
Problem: Is a node is renamed and the new name is out of the current
visible list of nodes the component will be recycled, this means
the props will change, so when the `onRename` functions is about to reset
the state the `this.source` will point to a different node.

To fix this, but also to separate business logic from visual representation,
the logic is moved into the renaming store and the component is only
responsible for rendering.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Oct 15, 2024

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@susnux susnux merged commit 5be8323 into master Oct 16, 2024
118 checks passed
@susnux susnux deleted the fix/files-rename branch October 16, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renamed nodes that are out of viewport keep renaming state
5 participants