Repository navigation
fix(mosaic): label switcher groups for assistive technology #10636
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 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,2 @@ | ||
| --- | ||
| --- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -761,7 +761,10 @@ function OrganizationSection() { | |
| {/* `auto` rather than `stable`: a reserved gutter insets the rows whether or not the list | ||
| overflows, so short lists would sit their avatars and icons off the edge the header and | ||
| footer align to. */} | ||
| <SwitcherGroup xstyle={[scrollAreaViewport('auto'), styles.scroll]}> | ||
| <SwitcherGroup | ||
| label={m.groups.organizations} | ||
| xstyle={[scrollAreaViewport('auto'), styles.scroll]} | ||
| > | ||
| {/* Memberships, invitations and suggestions are three separate requests landing at three | ||
| different moments. Rendering each as it arrives walks the list in in stages, so the | ||
| placeholder stands in for all of them until the last one is in. */} | ||
|
|
@@ -856,8 +859,10 @@ interface MenuRow { | |
| /** What can be done about the lead (manage it, and invite to an organization that leads), and the app's own rows. */ | ||
| function ManageSection() { | ||
| const m = useSwitcherMessages(); | ||
| const userButton = useMessages('userButton'); | ||
| const data = useSwitcherContext(); | ||
| const targets = settingsTargets(data, leadSelection(data, m), m); | ||
| const lead = leadSelection(data, m); | ||
| const targets = settingsTargets(data, lead, m); | ||
|
|
||
| const builtIn: MenuRow[] = []; | ||
| for (const action of data.layout.actions.manage) { | ||
|
|
@@ -902,7 +907,7 @@ function ManageSection() { | |
| return ( | ||
| <> | ||
| <SwitcherSeparator /> | ||
| <SwitcherGroup> | ||
| <SwitcherGroup label={lead.kind === 'organization' ? m.groups.organization : userButton.groups.account}> | ||
|
Contributor
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.
|
||
| {rows.map(r => ( | ||
| <React.Fragment key={r.id}>{r.node}</React.Fragment> | ||
| ))} | ||
|
|
@@ -965,7 +970,7 @@ function Footer() { | |
| return ( | ||
| <> | ||
| <SwitcherSeparator /> | ||
| <SwitcherGroup>{rows}</SwitcherGroup> | ||
| <SwitcherGroup label={m.accounts.label}>{rows}</SwitcherGroup> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
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.
Script executed:
Repository: clerk/javascript
Length of output: 6130
Script executed:
Repository: clerk/javascript
Length of output: 22985
Script executed:
Repository: clerk/javascript
Length of output: 10765
Add a patch changeset for
@clerk/mosaic.This PR changes the published component behavior by adding named groups for assistive technology. Add the package release entry and a short summary.
Suggested changeset
Committable suggestion