Skip to content
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(button): add button to web components v3 #27278

Conversation

chrisdholt
Copy link
Member

Previous Behavior

New Behavior

Related Issue(s)

  • Fixes #

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 21, 2023

📊 Bundle size report

🤖 This report was generated against 3c926baf2bd55186e277b61652573f7aef85a80c

@size-auditor
Copy link

size-auditor bot commented Mar 21, 2023

Asset size changes

⚠️ Insufficient baseline data to detect size changes

Unable to find bundle size details for Baseline commit: 7f5a5e5

Possible causes

  • The baseline build 7f5a5e5 is broken
  • The Size Auditor run for the baseline build 7f5a5e5 was not triggered

Recommendations

  • Please merge your branch for this Pull request with the latest master build and commit your changes once again

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 21, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 69b7f0e:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

Copy link
Contributor

@eljefe223 eljefe223 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the callouts in the stylesheet this looks good. Maybe lets try running the css selector analyzer and see if there i an consolidation that could happen here.

@chrisdholt chrisdholt force-pushed the users/chhol/add-button-to-web-components-v3 branch from d196df0 to 01d20ab Compare March 30, 2023 15:56
background-color: ${colorTransparentBackground};
}

:host(:is([disabled], [disabled-focusable], [appearance][disabled], [appearance][disabled-focusable])) .control,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why the appearance part of the selector ([appearance][disabled], [appearance][disabled-focusable]) is necessary?

Copy link
Member Author

@chrisdholt chrisdholt Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specificity - I can try and pull it off, but we have a number of styles where we're changing the various button states themselves, many which use attribute selectors. This ensures that regardless of the actual attribute value, ALL appearances should have these styles applied in both disabled and disabled-focusable scenarios. It's possible that :is() provides enough specificity...but I'm not sure. I had to add :is() in order to combine these AND get the right specificity (:where() was not specific enough, by design). I can test when I get the repo built again.

Copy link
Member

@miroslavstastny miroslavstastny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.
There is current-value attribute on all buttons in DOM:
image

What is the plan with a doc documenting FUIR9 - FUIWC3 differences?

@chrisdholt
Copy link
Member Author

Code looks good. There is current-value attribute on all buttons in DOM: image

What is the plan with a doc documenting FUIR9 - FUIWC3 differences?

I think we should document current-value for all form associated elements somewhere. Here's the rundown on where that came from and why it exists: microsoft/fast#5119

Unfortunately, the correct default value is an empty string...which does reflect here. We could probably open an issue to see if we can adjust for that single scenario but nothing comes to mind currently.

The only other delta (I think) we really have is as being a different element. I plan to get the anchor up to just close that gap.

@chrisdholt chrisdholt force-pushed the users/chhol/add-button-to-web-components-v3 branch from 7567615 to 29739fe Compare March 30, 2023 23:32
@chrisdholt chrisdholt enabled auto-merge (squash) March 31, 2023 00:08
@chrisdholt chrisdholt merged commit d901fa9 into microsoft:web-components-v3 Mar 31, 2023
chrisdholt added a commit that referenced this pull request Apr 29, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 30, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request Apr 30, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 2, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 2, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 2, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 3, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 6, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 6, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 8, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
radium-v pushed a commit that referenced this pull request May 10, 2024
* add button as a new web component

* change files

* add package export

* add icon attr, fixup disabled styles

* update color => fill

* add disabled focusable click handling

* move to attribute syntax for aria-disabled

* remove icon attribute in favor of min-height to accommodate icons

* use long form for padding to ensure we catch browser defaults

* add basic readme with deltas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants