-
Notifications
You must be signed in to change notification settings - Fork 18
feat(pie-switch): DSW-4019 bind the checked prop correctly and add missing form behaviours #2963
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
Open
raoufswe
wants to merge
12
commits into
main
Choose a base branch
from
dsw-4019-switch-default-checked
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f884bc8
feat(pie-switch): DSW-4019 remove unnessary prop and bind checked cor…
raoufswe 486a083
Merge branch 'main' into dsw-4019-switch-default-checked
raoufswe 6d7628e
fix(pie-switch): DSW-4019 revert some changes
raoufswe f36b91e
fix(pie-switch): DSW-4019 update docs
raoufswe ce2e7ed
fix(pie-switch): DSW-4019 improve screen readers output
raoufswe a50c7b8
fix(pie-switch): DSW-4019 update stories
raoufswe 78774eb
fix(pie-switch): DSW-4019 revert some changes
raoufswe 8fe29dd
fix(pie-switch): DSW-4019 revert some changes
raoufswe ba197ec
fix(pie-switch): DSW-4019 update defs
raoufswe df9db15
fix(pie-switch): DSW-4019 click handler
raoufswe ac89e88
fix(pie-switch): DSW-40119 revert some changes
raoufswe 8b49a03
fix(pie-switch): DSW-4019 fix click
raoufswe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| "@justeattakeaway/pie-switch": minor | ||
| --- | ||
|
|
||
| - [Removed] - (Breaking Change) `aria.describedby` support from pie-switch. It was misused as `aria-describedby` expects element IDs to reference existing descriptive elements, which isn’t feasible across Shadow DOM boundaries and being text conflicted with aria-label, internal labels, and external label handling. | ||
| - [Added] - Wrapped the checked value with the [lit live directive ](https://lit.dev/docs/api/directives/#live) to ensure the DOM and component state stay in sync. | ||
| - [Added] - Missing `defaultChecked` prop and form rest logic | ||
| - [Changed] - Refactored the toggle between leading and trailing labels to be handled via CSS. | ||
| - [Changed] - Updated the component to use a `<div>` as the parent wrapper when the label prop isn’t provided. This avoids nested `<label>` elements when consumers wrap the component with [an external label](https://webc.pie.design/?path=/docs/components-switch--overview#external-labels), which is an [invalid](https://forum.freecodecamp.org/t/nesting-label/462466) HTML pattern | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.