Skip to content

feat: add inline actions into workspaces table #17636

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 23 commits into from
May 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0ba8372
feat: add inline actions into workspaces table
BrunoQuaresma May 1, 2025
25d986e
Fix is retrying
BrunoQuaresma May 1, 2025
50d9d74
Refactor actions
BrunoQuaresma May 1, 2025
a20a188
Simplify permissions check
BrunoQuaresma May 1, 2025
6f054b9
Handle action errors
BrunoQuaresma May 1, 2025
fcc5a27
Refactor workspace update action
BrunoQuaresma May 1, 2025
10dcd68
Merge branch 'main' of https://github.com/coder/coder into bq/add-bas…
BrunoQuaresma May 1, 2025
766463d
Run fmt
BrunoQuaresma May 1, 2025
c14442c
Merge branch 'main' of https://github.com/coder/coder into bq/add-bas…
BrunoQuaresma May 1, 2025
281cf1a
Fix WorkspacesPage tests
BrunoQuaresma May 1, 2025
71c6369
Run FMT
BrunoQuaresma May 1, 2025
3502a22
Fix WorkspacePage tests
BrunoQuaresma May 1, 2025
7d2b8b3
Fix storybook failed tests
BrunoQuaresma May 1, 2025
61dc162
Fix one more storybook test
BrunoQuaresma May 1, 2025
ddcb1e9
Fixes
BrunoQuaresma May 1, 2025
53c4332
Adjust skeleton
BrunoQuaresma May 1, 2025
86337e2
Align inline actions to the right
BrunoQuaresma May 1, 2025
821f9d0
Merge branch 'main' into bq/add-base-actions
BrunoQuaresma May 2, 2025
b70e28f
Apply improvements from PR review
BrunoQuaresma May 6, 2025
b790963
Merge branch 'bq/add-base-actions' of https://github.com/coder/coder …
BrunoQuaresma May 6, 2025
0987ed1
Merge branch 'main' into bq/add-base-actions
BrunoQuaresma May 6, 2025
c1d3046
Fix lint
BrunoQuaresma May 6, 2025
f797506
Merge branch 'bq/add-base-actions' of https://github.com/coder/coder …
BrunoQuaresma May 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Align inline actions to the right
  • Loading branch information
BrunoQuaresma committed May 1, 2025
commit 86337e2c644960b784555834b8f17a72cc526b85
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ const WorkspaceActionsCell: FC<WorkspaceActionsCellProps> = ({

return (
<TableCell>
<div className="flex gap-1">
<div className="flex gap-1 justify-end">
{abilities.actions.includes("start") && (
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if it might be worthwhile to throw all of these into a .map callback. We're iterating over abilities.actions three times, which shouldn't be a huge deal, but a .map could let us iterate over everything exactly once

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good callout! I will check the actions, but I don't think we want to have all of them in the table. With that in mind, we would have to filter the actions before mapping them, which would not provide too much improvements IMO. For now, I would leave it as it is, but I'm wondering what you would do in this case.

<PrimaryAction
onClick={() => startWorkspaceMutation.mutate({})}
Expand Down
Loading