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): Correctly validate new node name #46767

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 25, 2024

Summary

This includes two fixes:

  1. The name in the "new node" dialog is correctly selected (e.g. file.txt only file is selected by default), to allow quick naming
  2. @nextcloud/files functions for filename validation are used, this allows to use new Nextcloud 30 capabilities (e.g. reserved names)

Screen recording

Bildschirmaufnahme_20240725_215605.webm

Checklist

@susnux susnux added this to the Nextcloud 30 milestone Jul 25, 2024
@susnux susnux requested a review from skjnldsv as a code owner July 25, 2024 21:06
@susnux susnux requested review from nfebe, Pytal and sorbaugh July 25, 2024 21:07
@susnux
Copy link
Contributor Author

susnux commented Jul 25, 2024

/backport to stable29

Copy link
Contributor

@nfebe nfebe left a comment

Choose a reason for hiding this comment

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

Except for synonym addition, lgtm

triggerActionForFile('file.txt', 'rename')

getRowForFile('file.txt')
.findByRole('textbox', { name: 'Filename' })
Copy link
Member

Choose a reason for hiding this comment

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

Fancy!

@skjnldsv
Copy link
Member

/compile rebase-amend /

* Resolves #45409

This includes two fixes:
1. The name in the "new node" dialog is correctly selected (e.g. `file.txt` only `file` is selected by default), to allow quick naming
2. `@nextcloud/files` functions for filename validation are used, this allows to use new Nextcloud 30 capabilities (e.g. reserved names)

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv skjnldsv enabled auto-merge July 26, 2024 09:09
@skjnldsv skjnldsv merged commit 87dc061 into master Jul 26, 2024
109 checks passed
@skjnldsv skjnldsv deleted the fix/files-new-file-node branch July 26, 2024 09:11
@blizzz blizzz mentioned this pull request Jul 30, 2024
@Jerome-Herbinet
Copy link
Member

Jerome-Herbinet commented Aug 1, 2024

Hi @susnux
It seems working for odt, ods, otp (Collabora) file types (except odg), but not for other file types : odg (Collabora), md and maybe txt (Nextcloud Text), and docx, xlsx, pptx (OnlyOffice). Tested on NC 30.0.0 beta 2. The whole file name and its extension are selected.
Do you want me to create another issue, or will you create another PR on the way to fix this ?
Thanks

@susnux
Copy link
Contributor Author

susnux commented Aug 1, 2024

@Jerome-Herbinet yes please open a ticket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants