-
Notifications
You must be signed in to change notification settings - Fork 56
fix(uui-color-slider): sets max = 360
for hue
type
#1149
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
Conversation
There was a problem hiding this comment.
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 restores the fixed maximum value for the hue slider in the UUI Color Picker by always setting max
to 360 when type
is 'hue'
, ensuring the full color spectrum is exposed.
- Always assign
max = 360
for hue (no nullable fallback) - Reverts the conditional fallback added in PR #1076 for hue
Comments suppressed due to low confidence (1)
packages/uui-color-slider/lib/uui-color-slider.element.ts:110
- Add a unit test to verify that the hue slider's
max
is correctly set to360
whentype
is'hue'
, ensuring the full spectrum is available.
this.max = 360;
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1149.westeurope.azurestaticapps.net |
I think this need to be simular at the other types - not just hue :) It makes sense hue value is between 0-360, but perhaps someone want to use alpha slider between 0-50 or 50-100. Ideally these can use clamp function to ensure a min or max lower/higher than expected value can't be configured. |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1149.westeurope.azurestaticapps.net |
Description
Extends the range of the hue slider in the UUI Color Picker component.
Fixes umbraco/Umbraco-CMS#19620.
PR #1076 added nullable fallbacks for the
max
value for the different types, (ref). Which for thehue
type doesn't account for the initialmax
value of100
, meaning it wouldn't fallback to360
by default.The previous implementation fixed the
max
value to360
, so I've reverted the code to this.Types of changes
How to test?
Open a Color Picker component, in the hue slider, extend to over a value of
100
, so that you can scroll through the spectrum of colours (from red to red).