- Notifications
You must be signed in to change notification settings - Fork1k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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()=>{ | ||
awaitrenderWorkspacePage() | ||
awaitscreen.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 onutils/workspace
calledgetWorkspaceDisplayName(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.
Uh oh!
There was an error while loading.Please reload this page.
Fixes:#3321
This PR modifies the Workspaces API to expose
template.display_name
. The property is consumed by Workspace pages.