-
Notifications
You must be signed in to change notification settings - Fork 891
feat: show template.display_name on Workspace pages #5082
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
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.
Backend lgtm
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.
LGTM. Just left some comments but it is up to you.
it("renders the template display name", async () => { | ||
await renderWorkspacePage() | ||
await screen.findByText(MockWorkspace.template_display_name) | ||
}) |
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.
In the FE, we use Storybook for visual tests and "integration tests"(the ones run by Jest) only for testing actions. So I think we can remove this.
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.
Removed, thanks for the suggestion!
<TableCellDataPrimary> | ||
{workspace.template_display_name.length > 0 | ||
? workspace.template_display_name | ||
: workspace.template_name} |
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.
Maybe we could have a util function on utils/workspace
called getWorkspaceDisplayName(workspace: Workspace): string
but it is your call.
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.
Added a util function.
Fixes: #3321
This PR modifies the Workspaces API to expose
template.display_name
. The property is consumed by Workspace pages.