Skip to content

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

Merged
merged 6 commits into from
Jul 22, 2022

Conversation

Kira-Pilot
Copy link
Member

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.
Screen Shot 2022-07-21 at 5 09 57 PM

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner July 22, 2022 14:02
@Kira-Pilot Kira-Pilot changed the title Update button visibility/kira pilot feat: improve update button visibility Jul 22, 2022
@@ -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)
Copy link
Contributor

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 {
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gooooood thinking

@AbhineetJain
Copy link
Contributor

Great change! 🙌

@Kira-Pilot Kira-Pilot merged commit 471564d into main Jul 22, 2022
@Kira-Pilot Kira-Pilot deleted the update-button-visibility/kira-pilot branch July 22, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make workspace "Update" button stand alone
2 participants