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

Label name uniqueness tweeks #535

Merged
merged 3 commits into from
Mar 1, 2024
Merged

Conversation

PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Dec 21, 2023

Warns if user is editing label name and it maches existing label. "Done" is disabled if name already exists.

image

Also

  • New labels are created with unique names suffixed with a number.
  • New labels loop through the confgi.ts:TOOL_COLORS.
  • Max width on label editor dialog.

Closes #477

Copy link

netlify bot commented Dec 21, 2023

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit badca45
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/65e1fe062efb530008e62dfc
😎 Deploy Preview https://deploy-preview-535--volview-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@floryst
Copy link
Collaborator

floryst commented Dec 29, 2023

I think it would be a good idea to enforce name uniqueness and not let the user create labels with duplicate names. Have we encountered a use-case for different labels with the same name?

@PaulHax
Copy link
Collaborator Author

PaulHax commented Dec 29, 2023

No known use case for duplicate names. I'll disable "Done" if name is used.

@PaulHax PaulHax marked this pull request as draft February 22, 2024 15:47
@PaulHax PaulHax marked this pull request as ready for review February 22, 2024 18:40
@PaulHax
Copy link
Collaborator Author

PaulHax commented Feb 22, 2024

Disabled Done button for segment and label editors if name already exists.

@PaulHax PaulHax requested review from floryst and removed request for jadh4v February 22, 2024 18:41
@floryst
Copy link
Collaborator

floryst commented Mar 1, 2024

Looks like there are issues with code formatting.

PaulHax added 3 commits March 1, 2024 11:08
* remove clear default labels flag from mergeLabels and make explicit function.
* set max width to LabelControls label editor
Still allows duplicate names if user presses "Done".

New labels are created with unique names suffixed with a number.

New labels loop through the confgi.ts:TOOL_COLORS.
@PaulHax PaulHax added this pull request to the merge queue Mar 1, 2024
Merged via the queue into Kitware:main with commit f5e5087 Mar 1, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Losing labels with matching names on serialization
2 participants