Skip to content

feat: add extra workspace actions in the workspaces table #17775

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 15 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Fix lint and tests
  • Loading branch information
BrunoQuaresma committed May 12, 2025
commit be967dd75c7e0043d0961308a083c8d369a7dfbe
5 changes: 0 additions & 5 deletions site/src/pages/WorkspacePage/WorkspaceTopbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ import { WorkspaceActions } from "./WorkspaceActions/WorkspaceActions";
import { WorkspaceNotifications } from "./WorkspaceNotifications/WorkspaceNotifications";
import { WorkspaceScheduleControls } from "./WorkspaceScheduleControls";

export type WorkspaceError =
| "getBuildsError"
| "buildError"
| "cancellationError";

export interface WorkspaceProps {
isUpdating: boolean;
isRestarting: boolean;
Expand Down
14 changes: 7 additions & 7 deletions site/src/pages/WorkspacesPage/WorkspacesPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("WorkspacesPage", () => {
await user.click(getWorkspaceCheckbox(workspaces[0]));
await user.click(getWorkspaceCheckbox(workspaces[1]));

await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const deleteButton = await screen.findByText(/delete/i);
await user.click(deleteButton);

Expand Down Expand Up @@ -106,7 +106,7 @@ describe("WorkspacesPage", () => {
await user.click(getWorkspaceCheckbox(workspace));
}

await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const updateButton = await screen.findByText(/update/i);
await user.click(updateButton);

Expand Down Expand Up @@ -145,7 +145,7 @@ describe("WorkspacesPage", () => {
await user.click(getWorkspaceCheckbox(workspace));
}

await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const updateButton = await screen.findByText(/update/i);
await user.click(updateButton);

Expand Down Expand Up @@ -183,7 +183,7 @@ describe("WorkspacesPage", () => {
await user.click(getWorkspaceCheckbox(workspace));
}

await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const updateButton = await screen.findByText(/update/i);
await user.click(updateButton);

Expand Down Expand Up @@ -223,7 +223,7 @@ describe("WorkspacesPage", () => {
await user.click(getWorkspaceCheckbox(workspace));
}

await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const updateButton = await screen.findByText(/update/i);
await user.click(updateButton);

Expand Down Expand Up @@ -263,7 +263,7 @@ describe("WorkspacesPage", () => {

await user.click(getWorkspaceCheckbox(workspaces[0]));
await user.click(getWorkspaceCheckbox(workspaces[1]));
await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const stopButton = await screen.findByRole("menuitem", { name: /stop/i });
await user.click(stopButton);

Expand All @@ -290,7 +290,7 @@ describe("WorkspacesPage", () => {

await user.click(getWorkspaceCheckbox(workspaces[0]));
await user.click(getWorkspaceCheckbox(workspaces[1]));
await user.click(screen.getByRole("button", { name: /actions/i }));
await user.click(screen.getByRole("button", { name: /bulk actions/i }));
const startButton = await screen.findByRole("menuitem", { name: /start/i });
await user.click(startButton);

Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({
css={{ borderRadius: 9999, marginLeft: "auto" }}
endIcon={<ChevronDownIcon className="size-4" />}
>
Actions
Bulk actions
</LoadingButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
Expand Down
Loading