-
Notifications
You must be signed in to change notification settings - Fork 896
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 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
bfdfd38
936c21e
1d5ecdb
c4a06e9
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { expect, within } from "@storybook/test"; | ||
import { | ||
type Workspace, | ||
type WorkspaceStatus, | ||
|
@@ -265,3 +266,30 @@ export const InvalidPageNumber: Story = { | |
page: 1000, | ||
}, | ||
}; | ||
|
||
export const ShowOrganizations: Story = { | ||
args: { | ||
workspaces: [ | ||
{ | ||
...MockWorkspace, | ||
organization_name: "Limbus Co.", | ||
}, | ||
], | ||
}, | ||
|
||
parameters: { | ||
showOrganizations: true, | ||
}, | ||
|
||
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(); | ||
}, | ||
Comment on lines
+284
to
+294
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. 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? 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. 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. |
||
}; |
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.
ah the wonderful subtleties of css. so annoying that this actually means something different. 🙃
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.
CSS is so silly sometimes