-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
refactor(range): remove legacy property and support for legacy syntax #29040
Conversation
This PR removes the tests for the legacy range syntax. A separate PR will be used to remove the implementation for the legacy syntax. --------- Co-authored-by: ionitron <[email protected]>
This pull request includes the changes to remove the `legacy` property for the range as part of #29040. That pull request specifically focuses on updating tests to remove any legacy range usage. The internal ticket suggested separating these changes into individual pull requests. Please refer to the mentioned pull request for a detailed description of the combined changes from both pull requests. This will be merged into that pull request upon approval. --------- Co-authored-by: ionitron <[email protected]>
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.
Do we need to update this:
await page.goto(`/src/components/range/test/legacy/basic`, config); |
core/src/components/range/range.tsx
Outdated
@@ -861,8 +767,7 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop | |||
} | |||
|
|||
render() { | |||
const { legacyFormController } = this; | |||
return legacyFormController.hasLegacyControl() ? this.renderLegacyRange() : this.renderRange(); | |||
return this.renderRange(); |
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 just move the renderRange
function into render
instead?
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.
Fixed in a65ec85
I updated the legacy path in 5cdedc9. However, this test is skipped so there should be no noticeable difference on CI right now. |
Issue number: internal
What is the current behavior?
In Ionic Framework v7, we simplified the range syntax so that it was no longer required to be placed inside of an
ion-item
. We maintained backwards compatibility by adding alegacy
property which allowed it to continue to be styled properly when written in the following way:While this was supported in v7, console warnings were logged to notify developers that they needed to update this syntax for the best accessibility experience.
What is the new behavior?
Removes the
legacy
property and support for the legacy syntax. Developers should follow the migration guide in the range documentation to update their apps. The new syntax requires alabel
oraria-label
onion-range
:Alternatively, the "label" slot can be used for developer who require custom HTML labels:
Removes the legacy tests under
range/test/legacy/
and all related screenshotsRemoves the range usage in
item/test/disabled
,item/test/legacy/disabled
Does this introduce a breaking change?
BREAKING CHANGE:
The
legacy
property and support for the legacy syntax, which involved placing anion-range
inside of anion-item
with anion-label
, have been removed from range. For more information on migrating from the legacy range syntax, refer to the Range documentation.