-
Notifications
You must be signed in to change notification settings - Fork 191
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(slider): skip variant="filled" css when fill-start #4217
Conversation
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Tachometer resultsChromeslider permalinktest-basic
Firefoxslider permalinktest-basic
|
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.
Would it be useful to have a VRT that intersected with this change to ensure we do not regress on this?
@@ -101,7 +101,7 @@ export class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ''), { | |||
if (variant === this.variant) { | |||
return; | |||
} | |||
if (variants.includes(variant)) { | |||
if (variants.includes(variant) && this.fillStart === undefined) { |
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.
We'll need text in the readme as to the prioritization here.
… into bug/slider-variant-filled
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.
LGTM! Thanks for clearing this intersection up for consumers. 🙇🏼
* fix(slider): no change in background for variant filled and fill start * chore(slider): updated readme for slider with fill start and variant filled --------- Co-authored-by: Rajdeep Chandra <rajdeepchandra@Rajdeeps-MacBook-Pro-2.local>
Description
This PR adds a condition
this.fillStart === undefined
to the setvariant
method in order to address a specific issue. The condition ensures that the variant attribute is only set if the fillStart property is undefined, preventing unintended behavior when both variant andfillStart
attributes are present simultaneously.Changes
Added a condition
this.fillStart === undefined
to the set variant method.Updated the logic to set or remove the variant attribute based on the new condition.
Related issue(s)
variant="filled"
ANDfill-start
fills in unexpected ways. #3973Motivation and context
How has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.