-
Notifications
You must be signed in to change notification settings - Fork 52
add new check on alpha to check if undefined #1061
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
base: v1/contrib
Are you sure you want to change the base?
Conversation
@@ -379,7 +379,7 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) { | |||
this.hue = h; | |||
this.saturation = s; | |||
this.lightness = l; | |||
this.alpha = this.opacity ? a * 100 : 100; | |||
this.alpha = this.opacity != undefined ? a * 100 : 100; |
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.
Not sure how opacity
can be undefined? It's a boolean property with false
as default value.
In the story it set value: undefined
.
I guess it is more likely a
from parsed color which is undefined or null, if value
property is defined/null.
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.
I think @bjarnef has a point here and would like to get it investigated before merging.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1061.westeurope.azurestaticapps.net |
Adds checks to this.alpha
Description
Added a new check in to alpha to check if the value for the color picker is defined or not.
if the value is undefined, it will default the alpha to 100
Types of changes
Motivation and context
This is to improve the UX for when user is picking a new color
How to test?
Using the eye dropper color picker data type, when on a content node of the content tree, if you click on the round colour selection palette to change the colour, you will see that the default opacity is 100 now
Screenshots (if appropriate)
Checklist