Skip to content

fix: check tag while renaming#13257

Merged
ChristophWurst merged 1 commit into
nextcloud:mainfrom
madbob:issue_9058
Jul 20, 2026
Merged

fix: check tag while renaming#13257
ChristophWurst merged 1 commit into
nextcloud:mainfrom
madbob:issue_9058

Conversation

@madbob

@madbob madbob commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

I've replicated the same checks done while creating a new tag also when renaming it (not a duplicate, not empty, not an hidden tag).

Please note that here I've also removed some unused code left in TagModal when TagItem was introduced (db38c4c).

Fixes #9058

@kesselb

kesselb commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR 👍

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the tag renaming flow to apply the same client-side validation used when creating tags (prevent hidden-system names, empty names, and duplicates), and removes unused legacy code from TagModal now that TagItem owns the edit/rename UI.

Changes:

  • Add validation checks to tag renaming in TagItem (hidden tag name / duplicate / empty).
  • Remove unused rename-related state and methods from TagModal.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/components/TagItem.vue Adds rename-time validation (hidden/duplicate/empty) and reuses existing close behavior after successful rename.
src/components/TagModal.vue Removes unused legacy rename helpers/state that are no longer used since TagItem handles renaming.

Comment thread src/components/TagItem.vue Outdated
@madbob

madbob commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

By the way: is there any reason why hiddenTags is in src/components/tags.js and not in src/util/tag.js?

@ChristophWurst

Copy link
Copy Markdown
Member

is there any reason why hiddenTags is in src/components/tags.js and not in src/util/tag.js?

Not that I'm aware of

@ChristophWurst ChristophWurst 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.

Tested and works!

Commented UX and architectural suggestions

Comment thread src/components/TagItem.vue Outdated
Comment thread src/util/tag.js Outdated
Signed-off-by: Roberto Guido <info@madbob.org>

@ChristophWurst ChristophWurst 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.

Tested & works

Image

@ChristophWurst

Copy link
Copy Markdown
Member

/backport to stable5.10

@ChristophWurst
ChristophWurst merged commit 6f826ac into nextcloud:main Jul 20, 2026
42 checks passed
@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renaming tags allows saving a tag with an existing name.

4 participants