-
Notifications
You must be signed in to change notification settings - Fork 51
SideNav - Deprecate SideNav::Header::IconButton (HDS-3770 )
#2354
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
Changes from 12 commits
25cac76
b842c96
ec2b2c2
d740854
cdb11cd
b6e7ae4
60d53d7
bb27a1a
8fd4318
0e8dca4
28154d7
f6fb8db
8295889
488679c
1441b72
ba7d5c2
54a75c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@hashicorp/design-system-components": minor | ||
| --- | ||
|
|
||
| `Hds::SideNav::Header::IconButton` - Deprecate the component. Use the `Hds::Button` component with `isIconOnly` set to `true` as a replacement. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| */ | ||
|
|
||
| import Component from '@glimmer/component'; | ||
| import { assert } from '@ember/debug'; | ||
| import { assert, deprecate } from '@ember/debug'; | ||
|
|
||
| import type { HdsIconSignature } from '../../icon'; | ||
| import type { HdsInteractiveSignature } from '../../interactive/'; | ||
|
|
@@ -18,11 +18,27 @@ interface HdsSideNavHeaderIconButtonSignature { | |
| } | ||
|
|
||
| export default class HdsSideNavHeaderIconButtonComponent extends Component<HdsSideNavHeaderIconButtonSignature> { | ||
| /** | ||
| * @param ariaLabel | ||
| * @type {string} | ||
| * @description The value of `aria-label` | ||
| */ | ||
| constructor( | ||
| owner: unknown, | ||
| args: HdsSideNavHeaderIconButtonSignature['Args'] | ||
| ) { | ||
| super(owner, args); | ||
|
|
||
| deprecate( | ||
| 'The `Hds::SideNav::Header::IconButton` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::Button` with the `isIconOnly` variant instead.', | ||
| false, | ||
| { | ||
| id: 'hds.components.sidenav.header.iconbutton', | ||
| until: '5.0.0', | ||
| url: 'https://helios.hashicorp.design/components/side-nav?tab=version%20history#4100', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like we're missing the actual content that should appear on the version tab outlining the changes here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain a bit more? Do I manually add an .md file in "website/docs/components/side-nav/partials/version-history/" like the "4.8.0.md" in there now? Do I copy the changeset text into it (pasted below)? "Deprecated the component. Use the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds roughly correct to me. You should be able to mimic what Zack did in https://github.com/hashicorp/design-system/pull/2347/files if you're looking for a reference.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| for: '@hashicorp/design-system-components', | ||
| since: { | ||
| enabled: '4.10.0', | ||
| }, | ||
| } | ||
| ); | ||
| } | ||
|
|
||
| get ariaLabel(): string { | ||
| const { ariaLabel } = this.args; | ||
|
|
||
|
|
||
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.
I like the idea of adding this to the template π
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.
Thanks. I copied from someone else :)