-
Notifications
You must be signed in to change notification settings - Fork 51
AppHeader: add close callback to yielded blocks #3031
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
005b2de to
1b4a9d8
Compare
Co-authored-by: Kristin Bradley <[email protected]>
| <HdsDropdown @enableCollisionDetection={{true}} as |dd|> | ||
| <dd.ToggleButton @text={{this.orgPickerLabel}} @icon="org" /> | ||
| <dd.Checkmark> | ||
| <dd.Checkmark {{on "click" actions.close}}> |
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.
This implementation is nice. Seems very simple & convenient for consumers to use.
KristinLBradley
left a comment
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.
Very nicely done! Simple & elegant.
didoo
left a comment
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.
Left a couple of suggestions, for your consideration
showcase/tests/integration/components/hds/app-header/index-test.js
Outdated
Show resolved
Hide resolved
| }); | ||
|
|
||
| // Close callback | ||
| test('it should hide the actions when the "close" function is called from global actions', async function (assert) { |
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.
[suggestion] for simplicity, and avoid too much duplication, you could consider merging the two set of tests (for global and utility actions), for example by opening the menu, closing it via close in global action, then re-open it again, and the close it again via close in utility 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.
Good point, I have pushed a fix to consolidate the tests.
📌 Summary
If merged, this PR would return a close callback to the yielded blocks in AppHeader.
It also fixes a small bug @MelSumner found where the accessible name for the nav element includes the word navigation, which makes screen readers announce "Application local navigation navigation"
To see the callbacks working, test the demos on the AppHeader showcase page.
🔗 External links
Jira ticket: HDS-5156
Figma file: [if it applies]
👀 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.