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

The color of the existing layers changes after adding another layer #3656

Closed
2xXLunAXx2 opened this issue Dec 25, 2022 · 3 comments
Closed
Assignees
Labels
🐛Bug Something isn't working Module: Annotation
Milestone

Comments

@2xXLunAXx2
Copy link

Describe the bug
Let's say I have two layers. One layer is shown in red and the other one in blue. Now I add another layer. The new layer gets a new color, BUT the colors of the two other layers change (for example, the first layer is now green, the second one is now red and the new layer is yellow).

To Reproduce
Steps to reproduce the behavior:

  1. Go to a file with existing layers.
  2. Note the color of each layer.
  3. Add a new layer.
  4. Go back to the file and see that the colors of the existing layers changed.

Expected behavior
Each time a layer is added, the colors of the previous layers remain the same.

Please complete the following information:

  • Version and build ID: 25.1
  • OS: Windows
  • Browser: chrome

Thank you!

@yanirmr
Copy link

yanirmr commented Dec 29, 2022

If I may, I believe it is important to maintain consistency and predictability in the user interface. When the colors of existing layers change unexpectedly after adding a new layer, it can be confusing and disrupt the user's workflow. It would be more intuitive if the colors of the existing layers remained unchanged, and only the new layer was assigned a new color. This would help to reduce confusion and improve the overall user experience.
Thank you for considering this issue.

@reckart
Copy link
Member

reckart commented Dec 29, 2022

The colors are by default assigned in a round-robin fashion going over the layers. The problem is probably that the order the layers are gone through is by default alphabetic - which may induce the changes in color you observe. Probably we can fix it in the code by going over the layers in "creation" order.

@reckart reckart added the 🐛Bug Something isn't working label Dec 29, 2022
@reckart reckart added this to the 26.4 milestone Dec 29, 2022
@reckart
Copy link
Member

reckart commented Jan 4, 2023

Note that removing a layer would still cause "subsequent" layers to shift their colors.

@reckart reckart self-assigned this Jan 4, 2023
reckart added a commit that referenced this issue Jan 4, 2023
… layer

- Sort layers by "creation order" to ensure colors do not shift when a new layer is added
reckart added a commit that referenced this issue Jan 4, 2023
…-of-the-existing-layers-changes-after-adding-another-layer

#3656 - The color of the existing layers changes after adding another layer
@reckart reckart closed this as completed Jan 4, 2023
reckart added a commit that referenced this issue Jan 4, 2023
* release/26.x:
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
reckart added a commit that referenced this issue Jan 4, 2023
* main:
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
  #283 - Resize span
  #283 - Resize span
  #283 - Resize span
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3676 - Error when rejecting annotation suggestion
  #3675 - Clean up more brat code
  #1535 - Keyboard shortcuts do not work when focus is in certain editors
  #3571 - Update dependencies
  #3670 - Remove LIF support
  #3670 - Remove LIF support
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-26.3
  #3650 - Link label shows layer name instead of label
reckart added a commit that referenced this issue Jan 4, 2023
* main: (64 commits)
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
  #283 - Resize span
  #283 - Resize span
  #283 - Resize span
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3676 - Error when rejecting annotation suggestion
  #3675 - Clean up more brat code
  #1535 - Keyboard shortcuts do not work when focus is in certain editors
  #3571 - Update dependencies
  #3670 - Remove LIF support
  #3670 - Remove LIF support
  #3668 - Disable tutorial for now
  #3664 - Avoid server-side HTML composition not using Wicket
  #3664 - Avoid server-side HTML composition not using Wicket
  #283 - Resize span
  #3660 - Option to disable span clipping
  ...
@reckart reckart modified the milestones: 26.5, 26.4 Jan 4, 2023
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Annotation
Projects
Archived in project
Development

No branches or pull requests

3 participants