-
Notifications
You must be signed in to change notification settings - Fork 881
feat: improve update button visibility #3115
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
@@ -34,7 +41,23 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({ | |||
workspace.latest_build, | |||
) | |||
const workspaceState = WorkspaceStateEnum[workspaceStatus] | |||
const actions = WorkspaceStateActions[workspaceState] | |||
|
|||
const canUpdateWorkspace = workspace.outdated && canAcceptJobs(workspaceStatus) |
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.
canUpdateWorkspace
has been used previously to refer to update permissions on the workspace: https://github.com/coder/coder/blob/main/site/src/pages/WorkspacePage/WorkspacePage.tsx#L37. Maybe we can rename it to canBeUpdated
?
* Returns a human-readable string describing when the workspace was created | ||
* Broken into its own module for testing purposes | ||
*/ | ||
export function createDayString(createdAt: string): string { |
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.
Should we move this to a util
and update other instances to use this method? https://github.com/coder/coder/search?q=dayjs%28%29.to
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.
gooooood thinking
Great change! 🙌 |
resolves #3024
To improve visibility, the
Update
button is always given primary focus in the workspace actions dropdown, if applicable.In addition, we've added the

Update
tooltip that lives in the workspaces table to the workspace view.