-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fixing Error in Hds::Flyout
& Hds::Modal
subcomponents
#2511
base: main
Are you sure you want to change the base?
Changes from all commits
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,11 @@ | ||
--- | ||
"@hashicorp/design-system-components": minor | ||
--- | ||
|
||
`Hds::DialogPrimitive` | ||
- Fixed error in `Description` and `Body` subcomponents, by not passing the `args` argument from the constructor to `super` | ||
- Added missing arguments in `Arg` TypeScript signature object | ||
|
||
`Hds::Modal` | ||
- Fixed error in `Body` subcomponent, caused by not passing the `args` argument from the constructor to `super` | ||
- Added missing arguments in `Arg` TypeScript signature object | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,16 @@ import Component from '@glimmer/component'; | |
import { deprecate } from '@ember/debug'; | ||
|
||
export interface HdsFlyoutBodySignature { | ||
Args: never; | ||
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. [question] as a pattern, do we prefer to have /cc @alex-ju 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. Or is it because below we need to have a 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.
not having we could use constructor(owner: unknown, args: never) { 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.
@alex-ju Good. So nothing to change on my side :)
@alex-ju @zamoore since this is a deviation from the pattern, should we add a comment above these |
||
Blocks: { | ||
default: []; | ||
}; | ||
Element: HTMLDivElement; | ||
} | ||
|
||
export default class HdsFlyoutBody extends Component<HdsFlyoutBodySignature> { | ||
constructor(owner: unknown) { | ||
super(owner, {}); | ||
constructor(owner: unknown, args: HdsFlyoutBodySignature['Args']) { | ||
super(owner, args); | ||
|
||
deprecate( | ||
'The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.', | ||
|
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 changelog would need to be updated, as we're not making any changes to the
DialogPrimitive
and there are no missing arguments anymore.