Skip to content

fix(files): Ensure renaming state is correctly reset - #48425

Merged
susnux merged 2 commits into
masterfrom
fix/files-rename
Oct 16, 2024
Merged

fix(files): Ensure renaming state is correctly reset#48425
susnux merged 2 commits into
masterfrom
fix/files-rename

Conversation

@susnux

@susnuxsusnux commented Sep 27, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

/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 ownerOctober 7, 2024 10:56
@susnux
susnux requested review from a team, Pytal, artonge and sorbaugh and removed request for a teamOctober 7, 2024 10:57
@susnux

Copy link
Copy Markdown
ContributorAuthor

/compile

@susnux
susnux enabled auto-merge October 8, 2024 16:42
@skjnldsvskjnldsv 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
Copy Markdown
ContributorAuthor

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@susnux
susnux merged commit 5be8323 into masterOct 16, 2024
@susnux
susnux deleted the fix/files-rename branch October 16, 2024 11:12
@susnux

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: 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

@susnux@artonge@skjnldsv@Pytal@nextcloud-command