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: Keep colors while changing packages #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abizek
Copy link

@abizek abizek commented Mar 29, 2024

Fixes #159

  • Use a record to store package names -> color mapping
  • Add the color to use for a package in its data and use it in all components
2024-03-29.14-12-50.mp4

Note

Does not remember colors of removed packages

use a record to store package names -> color mapping
add the color to use for a package in its data and use it in all components
fixes uidotdev#159
Copy link

vercel bot commented Mar 29, 2024

@abizek is attempting to deploy a commit to the uidotdev Team on Vercel.

A member of the Team first needs to authorize it.

@abizek
Copy link
Author

abizek commented Mar 29, 2024

Note: I did not delve into remembering the package color used for removed packages, allowing the user to set a color of their choice or getting the default color of a package from a favicon or similar due to scope. Because we do not remember the colors of removed packages, a flicker occurs in an edge case when multiple packages are removed and added back in a different order. It seems like the local cache populates the page with the previously used color for the added package and then quickly reverts to the currently set color. This does not affect the consistency of colors. Only a flicker occurs when removed packages are readded.

2024-03-29.14-35-16.mp4

Remembering the colors of removed packages would fix this edge case bug, but I ran into issues like handling more than 10 packages, which is already not handled properly. We can make a different pull request if this issue affects a significant number of users.

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.

Keep colors while changing packages
1 participant