-
Notifications
You must be signed in to change notification settings - Fork 206
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
chore(button): CSS for icon-only attribute #3716
Conversation
FYI: #3398 |
@najikahalsema @Westbrook If everything looks good here can we merge this? |
Tachometer resultsChromeaction-bar permalink
action-button permalink
action-group permalink
action-menu permalink
alert-dialog permalink
button-group permalink
button permalink
dialog permalink
infield-button permalink
menu permalink
number-field permalink
overlay permalink
picker-button permalink
picker permalink
popover permalink
search permalink
slider permalink
split-button permalink
tags permalink
toast permalink
tooltip permalink
Firefoxaction-bar permalink
action-button permalink
action-group permalink
action-menu permalink
alert-dialog permalink
button-group permalink
button permalink
dialog permalink
infield-button permalink
menu permalink
number-field permalink
overlay permalink
picker-button permalink
picker permalink
popover permalink
search permalink
slider permalink
split-button permalink
tags permalink
toast permalink
tooltip permalink
|
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.
Disregard my approval. Can you investigate why the build is failing to meet test coverage in chromium?
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.
Some things for this:
-
please add stories with the icon only button in isolation so we can manage it via regression testing
-
Should a user be able to set
buttonRef.iconOnly = true
or do we want to requirebuttonRef.toggleAttribute('icon-only', true)
? Either way works, but we should add content about this to the documentation site based on the decisions we make there for today. -
see https://spectrum.adobe.com/page/button/#Label-and-icon, particularly:
The label can be hidden to create an icon-only button. If the label is hidden, an icon is required, and the label will appear in a tooltip.
I'm OK not to block on that, though it would be nice to have this feature, too. We can land this for Coachmark work as is (with stories) and then keep [Feat][Button]: Support
icon-only
attribute #3398 open for the follow up work around a Tooltip.
@Westbrook Added the required stories and also updated the tests and docs to cater icon-only attribute for Icon Only Button element |
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. Let's land this plane 🛬
@@ -84,7 +84,7 @@ describe('Button', () => { | |||
it('loads default only icon', async () => { | |||
const el = await fixture<Button>( | |||
html` | |||
<sp-button label="Button"> | |||
<sp-button label="Button" icon-only> |
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.
👏🏼 👏🏼 👏🏼
Description
Added CSS for icon-only attribute for
sp-button
Motivation and context
To solve the below issue on a rounded button with icon
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
.