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

[Feature Request]: Addon-control color picker preset limit #20298

Open
redonkulus opened this issue Dec 16, 2022 · 5 comments
Open

[Feature Request]: Addon-control color picker preset limit #20298

redonkulus opened this issue Dec 16, 2022 · 5 comments

Comments

@redonkulus
Copy link

Is your feature request related to a problem? Please describe

/cc @ghengeveld and @shilman who initially worked on this code and decided on the 27 preset color limit.

My design system has more than 27 colors available to choose from. However, the default color picker control option does not allow any more colors past 27 due to this line of code:

return initialPresets.concat(selectedColors).filter(Boolean).slice(-27);

Describe the solution you'd like

Provide a mechanism to allow the color picker preset limit to be changed or disabled entirely. If possible, I would be willing to open a PR to enhance the code with proper guidance.

Describe alternatives you've considered

Not sure on alternatives since the color picker not configurable. I would create a custom add-on but that seems heavy handed when all I need is to change the limit.

Are you able to assist to bring the feature to reality?

yes, I can

Additional context

No response

@ghengeveld
Copy link
Member

The rationale for the 27 swatches limit is that usually the list grows with each picked color, and we don't want limitless "memory". In case of preconfigured swatches, that does not apply and so it makes sense to be able to see more.

We could either swap out the 27th swatch with a "view more" button (e.g. [...]) which when clicked will extend the list of swatches to the full set, or simply always show the full set, but only if that set consists of preconfigured swatches. What do y'all think makes most sense?

@redonkulus
Copy link
Author

I'm fine with showing the complete set since in most cases we would want to display all preset colors.

@skaindl
Copy link

skaindl commented Jan 16, 2024

I agree, I feel like the custom-defined preset colors should always be shown and not conflict with a very short list of available slots for additional user-defined colors. Any chance that this will be changed?

@shilman
Copy link
Member

shilman commented Jan 17, 2024

I'd be open to a PR here since it seems like a few of you are running into this.

@dalemoore
Copy link

I just ran into this issue as well. Our fledgling design system consists of color palettes for two schemes, one for the overall organization (set by the university) and another for a federally-funded program which our unit maintains for the state. I'm shorted 4 colors with the current setup.

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

No branches or pull requests

5 participants