Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: show organization name in workspaces table#14547

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Parkreiner merged 4 commits intomainfrommes/orgs-table-update
Sep 5, 2024

Conversation

Parkreiner
Copy link
Member

Closes#14278

Changes made

  • Added logic to show organization name when theshowOrganization property fromuseDashboard istrue
  • Added text labels for username and organization name to help remove UI ambiguity
  • Added small Storybook test to make sure that organization info is accessible
  • Made a slight tweak to the CSS for theAvatarData component to make sure that its line height can't inherently incorrectly

Screenshot 2024-09-03 at 3 49 25 PM

Comment on lines +284 to +294
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const accessibleTableCell = await canvas.findByRole("cell", {
// Need whitespace classes because different parts of the element
// are going in different spans, and Storybook doesn't consolidate
// these
name: /org\s?(?:anization)?\s?:\s?Limbus Co\./i,
});

expect(accessibleTableCell).toBeDefined();
},
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just wanted to make sure that I understand the limitations around decorators: they're basically assumed to always be static values, right? There's no easy way to make a decorator re-render with a new value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

each "decorator" undergoes a small transformation to get turned into a component by storybook. there's no way to force a rerender from the outside, just like any other component. being a component tho, they can call hooks and have state, which is kind of non-obvious.

Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

only thing is that I'm wondering if we really even need the labels. curious what the rationale was.

Comment on lines 213 to 214
org
<span css={{ ...visuallyHidden }}>anization</span>:
Copy link
Member

@aslilacaslilacSep 3, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

are screen readers going to handle this split well though? my gut feeling is they say "org anization" with some awful disconnected pronounciation

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I tried it with the built-in Mac screen reader, but (1) I think I was just assuming that any elements that are semantically inline elements wouldn't affect pronunciation, and (2) the Mac screen reader isn't even the most popular reader by a long shot

Let me change this just to be on the safe side

@@ -54,7 +54,7 @@ export const AvatarData: FC<AvatarDataProps> = ({
css={{
fontSize: 13,
color: theme.palette.text.secondary,
lineHeight:"150%",
lineHeight:1.5,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ah the wonderful subtleties of css. so annoying that this actually means something different. 🙃

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

CSS is so silly sometimes

@Parkreiner
Copy link
MemberAuthor

@aslilac Sorry I didn't get back to this yesterday, but now that I think about it, I think you're right, and that the labels are unnecessary

I guess my worry was that, as we keep cramming multiple values into single table cells, we still need a way to structure the information. Because the HTML spec basically assumes that table cells will basically be like database columns – no more than one value per cell. So anytime we diverge from that, we can't assume that we'll have accessible info just because we're using the correct baseline semantics. I think I'm also just a bit skittish about multiple unlabeled values in general

I still think the labels are good for screen readers, but I do think it's overkill for sighted users. Let me switch things around, which should also make it easier to maintain on our end

@ParkreinerParkreiner changed the titlefeat: show organization name in workspaces table based on dashboard settingsfeat: show organization name in workspaces tableSep 5, 2024
@ParkreinerParkreiner merged commitc249174 intomainSep 5, 2024
30 checks passed
@ParkreinerParkreiner deleted the mes/orgs-table-update branchSeptember 5, 2024 16:32
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 5, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

Assignees

@ParkreinerParkreiner

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

⭐ Add organization context to the workspaces table
2 participants
@Parkreiner@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp