-
Notifications
You must be signed in to change notification settings - Fork 51
Button - Fix color of Buttons within Modal triggered from SideNav or AppHeader (HDS-5572)
#3335
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?
Button - Fix color of Buttons within Modal triggered from SideNav or AppHeader (HDS-5572)
#3335
Conversation
…ggered from within the SideNav or AppHeader
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| </M.Footer> | ||
| </:modal> | ||
| </ModalWithTrigger> | ||
| </SNL.Item> |
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 added a rough example for testing. Should I refine it a bit more? Currently, it just uses a plain unstyled button to trigger the Modal.
I can add an example Modal triggered within the AppHeader as well.
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.
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.
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.
Should we add dark theming styles to the SuperSelect when used directly within the SideNav content?
(Or perhaps since there's been no call for this yet from consumers and we are also working towards adding true theming, it's not really necessary)
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.
If the examples I added in the SideNav demo look good, I can add similar examples to the AppHeader Showcase.
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.
Yes, they look good. The only thing I would do, is to minimize the demo code added (we're targeting mainly the buttons, so no need to have a full realistic demo; eg, the fake content in the flyout is not necessary)
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 simplified the examples including adding a new code fragment with a simplified SuperSelect example.
I will update the AppHeader Showcase to include similar examples next.
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.
AppHeader Showcase examples added: https://hds-showcase-git-kristin-hds-5572-fix-modal-bu-8bf325-hashicorp.vercel.app/components/app-header#with-nested-button-content
| .ember-basic-dropdown-trigger * *, | ||
| .ember-basic-dropdown-content * *, | ||
| .hds-dialog-primitive__wrapper * | ||
| ) { |
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.
Chaining CSS :not selectors like this isn't ideal. I could experiment to try to come up with something better, or else we could see if we can find a better solution using the upcoming theming options.
…ontent examples to SideNav Showcase
Button - Fix color of Buttons used inside Modal triggered from SideNav or AppHeader (HDS-5572)Button - Fix color of Buttons within Modal triggered from SideNav or AppHeader (HDS-5572)
…rget dimension requirements
| > .hds-icon { | ||
| width: 16px; | ||
| height: 16px; | ||
| } |
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.
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.
My updates to the styles caused the text-based link to display as a block when previously it had ignored the width and height styles.
It seems the class name should be removed from the text-based link and a different class and styles should be added if needed.
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 replaced the class name on the link in the AdvancedTable Showcase and added some basic styles to style the link color the same. (May want to make an official "ShwLink" component or something sometime, but for now I just wanted to keep the link visually the same as it had been previously.)






📌 Summary
If merged, this PR prevents inheritance of dark color styles on Buttons within Modals (actually DialogPrimitive) triggered within the
SideNavorAppHeaderShowcase previews:
🛠️ Detailed description
SideNav&AppHeaderstyles to preventButton&Dropdowncontained in aDialogPrimitivefrom inheriting dark theme.SideNav&AppHeaderShowcase: Add examples of nestedButton,Dropdown, &SuperSelectcontent withinDialogPrimitive, etc.📸 Screenshots
SideNav Showcase example added:

AppHeader Showcase example added:

BEFORE:

AFTER:

🔗 External links
👀 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.