-
Notifications
You must be signed in to change notification settings - Fork 15
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
[@next] port deprecated (2.x) button for backwards compatibility #454
Conversation
…or backwards compatibility
Run & review this pull request in StackBlitz Codeflow. |
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.
Looks good. Probably should throw an @deprecated
JSDoc tag on the component class/interface and define method. Curious if there'd be a good way to propagate that to the Angular modules via the schematic, too.
🚀 PR was released in |
This change brings support for the "decorator" pattern for buttons that we used in the 2.x version to the 3.0 version. This is only for backwards compatibility and should be API-compatible with the 2.x implementation.
It allows for slotting native
<button>
elements in for backwards compatibility to ease the upgrade process:This was ported from the 2.x version and integrated with design tokens (it uses the same styles from the new 3.0 button but with
::slotted()
selectors instead and some minor overrides to match 2.x.This is not a direct port from 2.x and it wasn't intended to be. The styles were moved to the shadow DOM, and it was integrated with the new state-layer and focus-indicators. This is purely for supporting slotted native
<button>
elements.Consumers will need to opt-in to renaming their existing elements to
<forge-deprecated-button>
if they want to avoid sweeping their code.