-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[dashboard] Allow workspace renaming #5695
Conversation
51862a5
to
801e327
Compare
Looking at this now! 👀 |
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.
UX looks great overall, @laushinka! 🌟
Lunch happened and reviewing took longer than expected! 🍝
Left some comments below, but feel free to open follow up issues for anything that would significantly increase the scope of this PR. 💭
Approving to unblock merging. I'd suggest to also ask for a closer look (review) at the code. ➿
/hold
import ConfirmationModal from '../components/ConfirmationModal'; | ||
import Modal from '../components/Modal'; |
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.
praise: Good to see the modal component in action again! ➿
<Modal visible={isRenameModalVisible} onClose={() => setRenameModalVisible(false)} onEnter={() => { updateWorkspaceDescription(); return true }}> | ||
<h3 className="mb-4">Rename Workspace Description</h3> | ||
<div className="border-t border-b border-gray-200 dark:border-gray-800 -mx-6 px-6 py-4 space-y-2"> | ||
<input className="w-full" type="text" defaultValue={workspaceDescription} ref={renameInputRef} /> |
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.
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.
Good catch!
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.
@laushinka Alternatively, thinking about this again, a boring (simple) solution could be to not allow empty descriptions and return a warning alert which is similar to what we do with variables.💡
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.
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.
nitpick: Nice! What do you think of using a softer tone like the following?
Description cannot be empty.
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.
Yes 🍦
<Modal visible={isRenameModalVisible} onClose={() => setRenameModalVisible(false)} onEnter={() => { updateWorkspaceDescription(); return true }}> | ||
<h3 className="mb-4">Rename Workspace Description</h3> | ||
<div className="border-t border-b border-gray-200 dark:border-gray-800 -mx-6 px-6 py-4 space-y-2"> | ||
<input className="w-full" type="text" defaultValue={workspaceDescription} ref={renameInputRef} /> |
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.
suggestion: Could we enforce a character limit let's say of 250 characters as a) it does not make sense to allow more characters since these won't be visible in the dashboard and b) the generic alert dialog when saving with a long description does not provide any useful context, right?
Long description name hidden in the dashboard | Long description name error |
---|---|
<Modal visible={isRenameModalVisible} onClose={() => setRenameModalVisible(false)} onEnter={() => { updateWorkspaceDescription(); return true }}> | ||
<h3 className="mb-4">Rename Workspace Description</h3> | ||
<div className="border-t border-b border-gray-200 dark:border-gray-800 -mx-6 px-6 py-4 space-y-2"> | ||
<input className="w-full" type="text" defaultValue={workspaceDescription} ref={renameInputRef} /> |
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.
issue: Long descriptions seems to bring back a similar overflow issue as in #4556.
Overflowing text when deleting a workspace |
---|
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.
We should truncate it in addition to the 250 limit I suppose?
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.
I'd vote for truncation to also avoid breaking this component!
On the other side, we could go all-in by a) wrapping the text, b) allowing longer description to surface on the dashboard, etc. but this would be against the notion of ephemeral environments. Maybe this is something to consider in future if needed. 🗳️
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.
@@ -96,7 +128,7 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) { | |||
</Tooltip> | |||
</ItemField> | |||
<ItemField className="w-4/12 flex flex-col"> | |||
<div className="text-gray-500 dark:text-gray-400 overflow-ellipsis truncate">{ws.description}</div> | |||
<div className="text-gray-500 dark:text-gray-400 overflow-ellipsis truncate">{workspaceDescription}</div> |
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.
thought: Thinking of this PR and since this was a feature requested from some community members would it be interesting to measure how much people use this feature? Maybe have a self-serve graph of how many of the existing workspaces are renamed per day or week? Maybe also how many times people clicked the rename option in the dropdown option? It could be interesting to also see if the usage of this feature decreases after #3594. What do you think? Feel free to drop the idea if this would increase the scope of these changes. 💭
Cc @jakobhero
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.
fyi: Discussed this briefly with @svenefftinge earlier in the product sync meeting and we decided that adding tracking events here is a low priority given that the renaming functionality will be hidden behind the more actions dropdown. Up to you @laushinka and @jakobhero to decide if it's worth adding any tracking events within the scope of this PR. 🏓
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.
Agree that it would be useful to keep track but that we could do it in a separate issue if @jakobhero also thinks it's worth to track 🙏🏽
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.
hey there!👋 all clicks on buttons, anchors or clickable divs in the dashboard will be automatically tracked with the project & teams tracking PR i am currently working on. this means that we will see how many people clicked on the rename button, but now how many renames were successfully performed (which probably would be best tracked on the server). i think having visibility on how many users clicked on the button to open the modal is a good start to see how important this is to users and sufficient for now, wdyt?
2b9152c
to
7f3b634
Compare
0a2baf8
to
e53e486
Compare
/unhold @gtsiolis @corneliusludmann @JanKoehnlein just an fyi that I'll be off tomorrow. |
/lgtm |
1 similar comment
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gtsiolis, JanKoehnlein Associated issue: #3946 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
After a discussion with @corneliusludmann and @gtsiolis, instead of the initial proposal of allowing workspace ID renames, this PR allows the renaming of a workspace context description.
The reason to go this way is because the the workspaceID affects at the very least the URL of the workspace, and therefore could introduce breaking changes.
Related Issue(s)
Fixes #3946
How to test
Release Notes