-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
(web-components) Use ElementInternals
for Button elements
#30999
(web-components) Use ElementInternals
for Button elements
#30999
Conversation
5dd4204
to
ef03c6a
Compare
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. |
68ef4f9
to
e46ddf2
Compare
Some workflow notes: bumping deps and adding prodcution changes should be ideally done in N separate PRs as it's unrelated. this would be more likely a blocker if this PR would be against master branch but for you case I leave that decision up to you as it doesn't effect daily monorepo contributions. |
azure-pipelines-pr.yml
Outdated
@@ -29,6 +29,9 @@ jobs: | |||
filePath: yarn-ci.sh | |||
displayName: yarn (install packages) | |||
|
|||
- script: yarn playwright install --with-deps |
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.
FYI:
this is ok to live in wc3 branch.
if this would be against master we would most likely not accept this, as the cost of prolonging pipeline just for sake of 1 package is not worth the slowdown. If whole monorepo moves to use playwright for all e2e in feature then it's totally valid.
For this use-case we would need to make this on-demand as we do within fluent-contrib https://github.com/microsoft/fluentui-contrib/blob/main/packages/nx-plugin/src/executors/playwright/executor.ts#L51-L54
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.
How are the Playwright binaries currently made available for existing packages which use Storywright?
"paths": {} | ||
} | ||
} | ||
"tsconfigFilePath": "./tsconfig.api-extractor.json" |
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.
why is this change necessary ? another exotic tsconfig === more confusion / not following repo patterns
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.
The API Extractor doesn't use the tsconfigFilePath
if any overrideTsconfig
fields are present. This was causing warnings "Subsequent property declarations must have the same type" (TS2717) with @types/web
present.
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.
approving as it's for wc3 branch. these changes would not be acceptable for master - added more context in comments for better understanding. ty
d54e460
to
797dc64
Compare
797dc64
to
cdad9b4
Compare
ElementInternals
for Button elementElementInternals
for Button elements
- Add tests to toggle-button
Previous Behavior
Currently, form-associated custom elements use the
FormAssociated
class mixin. This mixin is heavy and duplicative, being copied wholesale for every component which utilizes it. WhileFormAssociated
includes minimal support forElementInternals
, the implementation isn't fully baked.New Behavior
Improvements:
<fluent-button>
custom element to useElementInternals
by default. An optional polyfill may be added in the near future, as more components transition to useElementInternals
.<fluent-toggle-button>
in favor of leaning onaria-pressed
(an element with arole
ofbutton
and thearia-pressed
attribute is treated as a toggle button).<fluent-menu-button>
and<fluent-compound-button>
elements to work with the changes in<fluent-button>
, since their classes are extensions ofButton
.<fluent-anchor-button>
. TheAnchorButton
class isn't actually extended fromButton
but it did use the same stylesheet. Its template structure hasn't changed.submit
- andreset
-type buttons to the Button story file.Other fixes:
projects
field was set to run all tests in Chromium three times in a row.