-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat(range): add label prop #27408
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
feat(range): add label prop #27408
Conversation
|
@@ -125,6 +125,32 @@ configs().forEach(({ title, screenshot, config }) => { | |||
expect(await range.screenshot()).toMatchSnapshot(screenshot(`range-items-fixed`)); | |||
}); | |||
}); | |||
|
|||
test.describe('range: label prop', () => { |
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.
Should this be limited to only one mode and one direction? The label prop doesn't change functionality regardless of mode/direction.
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 intentionally left all the configs in because the prop needed some styling separate from the slot, so I figured it would be good to verify no visual regressions in all cases, but I could go either way on it, honestly.
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.
If the majority is okay as is, then I can be on board.
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.
Can we add an additional test for when using both a label
property and label
slot? This can likely be a unit test, just to query for the expected DOM node.
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.
Can we add an additional test for when using both a label
property and label
slot? This can likely be a unit test, just to query for the expected DOM node.
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.
Can we add a usage of the label
prop to the a11y
file so we can run axe checks?
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.
Can we add a usage of the label
prop to the a11y
file so we can run axe checks?
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.
Is there a docs PR associated with this?
Docs PR created: ionic-team/ionic-docs#2955 |
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.
Great job!
Issue number: N/A
What is the current behavior?
Labels on
ion-range
can only be set via thelabel
slot. When only plain text is needed, this is cumbersome because you need to add an entire new element to wrap the label.What is the new behavior?
Label prop added. If both the prop and slot are used, the prop will take priority.
Does this introduce a breaking change?
Other information
7.0.6-dev.11683657201.139d03f4