8000 feat: Workspaces filtering by f0ssel · Pull Request #1972 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Workspaces filtering #1972

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
Jun 3, 2022
Merged
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
push up what I have
  • Loading branch information
f0ssel committed Jun 2, 2022
commit f8e09e68529ff99a473a7026d71b06cc6cb69045
11 changes: 9 additions & 2 deletions site/src/pages/WorkspacesPage/WorkspacesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import { Stack } from "../../components/Stack/Stack"
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
import { workspacesMachine } from "../../xServices/workspaces/workspacesXService"
import { WorkspacesPageView } from "./WorkspacesPageView"
import { CloseDropdown, OpenDropdown } from "../../components/DropdownArrows/DropdownArrows"

interface FilterFormValues {
query: string
}

const Language = {
filterName: "Filters",
createWorkspaceButton: "Create workspace",
yourWorkspacesButton: "Your workspaces",
allWorkspacesButton: "All workspaces"
Expand Down Expand Up @@ -73,10 +75,15 @@ const WorkspacesPage: FC = () => {
<div className={styles.actions}>
<Stack direction="row">
<Button aria-controls="filter-menu" aria-haspopup="true" onClick={handleClick}>
Filter
{Language.filterName} {anchorEl ? <CloseDropdown /> : <OpenDropdown />}
</Button>

<Menu id="filter-menu" anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
<Menu id="filter-menu"
anchorEl={anchorEl}
keepMounted
open={Boolean(anchorEl)}
onClose={handleClose}
>
<MenuItem onClick={setYourWorkspaces}>{Language.yourWorkspacesButton}</MenuItem>
<MenuItem onClick={setAllWorkspaces}>{Language.allWorkspacesButton}</MenuItem>
</Menu>
Expand Down
0