-
Notifications
You must be signed in to change notification settings - Fork 50
Showcase: convert Modal to gts #3300
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@alex-ju I did a review, and for me everything seems fine, apart from the |
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.
For the abstraction.... Personally I would prefer a wrapper that handles the button and isOpen state. It could yield the header/body/footer.
We do something similar with Form inputs where we want to customize the character count: https://github.com/hashicorp/design-system/blob/main/showcase/app/components/page-components/form/text-input/code-fragments/with-character-count.gts
import { COLORS } from '@hashicorp/design-system-components/components/hds/modal/index'; | ||
import { NAMES as ICON_NAMES } from '@hashicorp/design-system-components/components/hds/icon/index'; | ||
|
||
// Static color to icon mapping, same as in controller |
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.
// Static color to icon mapping, same as in controller | |
// Static color to icon mapping |
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.
Addressed in 01aaac3
superSelectOptions3 = ['Option 1', 'Option 2', 'Option 3']; | ||
superSelectSelectedOption3 = this.superSelectOptions3[0]; | ||
|
||
@action |
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.
Issue: you don't need to use @action
anymore, they can just be arrow functions.
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.
Addressed in 09a63d0
} | ||
|
||
@action | ||
noop() { |
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.
Issue: you can use import NOOP from 'showcase/utils/noop'
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.
Addressed in e374bf0
π Summary
Converting the Modal examples page to gts. Still in two minds about the best way to align it to other examples using
code-fragments
abstraction β feedback welcome.π οΈ Detailed description
πΈ Screenshots
π External links
Jira ticket: HDS-5346
π Component checklist
π¬ Please consider using conventional comments when reviewing this PR.
π PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.