Skip to content

fix: merge conflict dialog added when overwriting files on move-file action - #43667

Merged
emoral435 merged 4 commits into
masterfrom
fix/43489/merge-conflict-dialog
Feb 24, 2024
Merged

fix: merge conflict dialog added when overwriting files on move-file action#43667
emoral435 merged 4 commits into
masterfrom
fix/43489/merge-conflict-dialog

Conversation

@emoral435

@emoral435emoral435 commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

Summary

  • When user decides to move file to new destination, if a file with that same name already exists, currently, our implementation overrides the old file and injects the new file

Resolution

  • In order to resolve this, use @nextcloud/upload to check if there is a conflict, and if there is, shows a conflict dialog to resolve how the user wishes to proceed with the conflicting dialogs
  • If the conflict dialog returns two empty arrays, selected and renamed, that means the user chose to keep the file already in the directory path, thereby choosing to delete the current selected file they want to move

Screenshots / GIF

firefox_1XwZZSoVxP

Checklist

@emoral435emoral435 added this to the Nextcloud 29 milestone Feb 20, 2024
@emoral435emoral435 self-assigned this Feb 20, 2024
@emoral435
emoral435force-pushed the fix/43489/merge-conflict-dialog branch 3 times, most recently from 2077ddd to 65e080cCompareFebruary 20, 2024 17:33
@emoral435
emoral435 marked this pull request as ready for review February 20, 2024 17:36
Comment threadapps/files/src/actions/moveOrCopyAction.ts Outdated
@Pytal

Copy link
Copy Markdown
Member

Not related to this change but the conflict dialog close button is focusable with the keyboard but unclickable
image
I believe this is an issue with the z-index

@emoral435

emoral435 commented Feb 21, 2024

Copy link
Copy Markdown
ContributorAuthor

Hm. Good observation, and I can replicate it. I will investigate this issue!

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Logic makes sense!

…action
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
@emoral435
emoral435force-pushed the fix/43489/merge-conflict-dialog branch from 429279d to b933b67CompareFebruary 24, 2024 02:15
@github-actions

Copy link
Copy Markdown
Contributor

Possible performance regression detected

Show Output
564 queries added
= /remote.php/dav/files/test
= /remote.php/dav/files/test/test.txt
= /remote.php/dav/files/test/many_files
= /remote.php/dav/files/test/new_file.txt
= /remote.php/dav/files/test/new_file.txt
= /remote.php/dav/files/test
= /remote.php/dav/files/test/test.txt
= /remote.php/dav/files/test/many_files
= /remote.php/dav/files/test/new_file.txt
= /remote.php/dav/files/test/new_file.txt
+ /remote.php/dav/files/test added with 45 queries
+ /remote.php/dav/files/test/test.txt added with 33 queries
+ /remote.php/dav/files/test/many_files added with 46 queries
+ /remote.php/dav/files/test/new_file.txt added with 67 queries
+ /remote.php/dav/files/test/new_file.txt added with 91 queries
+ /remote.php/dav/files/test added with 45 queries
+ /remote.php/dav/files/test/test.txt added with 33 queries
+ /remote.php/dav/files/test/many_files added with 46 queries
+ /remote.php/dav/files/test/new_file.txt added with 67 queries
+ /remote.php/dav/files/test/new_file.txt added with 91 queries

@emoral435
emoral435 merged commit 59f3c73 into masterFeb 24, 2024
@emoral435
emoral435 deleted the fix/43489/merge-conflict-dialog branch February 24, 2024 06:39
@solracsf

Copy link
Copy Markdown
Member

/backport to stable28

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: When moving a folder, no merge dialog appears if the folder names are the same.

5 participants

@emoral435@Pytal@solracsf@susnux@skjnldsv