Skip to content

Commit c28e731

Browse files
committed
Merge branch 'main' into bq/refactor-workspaces
2 parents 8e9037a + 4de4e8e commit c28e731

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

site/src/components/VSCodeDesktopButton/VSCodeDesktopButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const VSCodeDesktopButton: FC<
6969
onClick={() => {
7070
setIsVariantMenuOpen(true)
7171
}}
72+
sx={{ px: 0 }}
7273
>
7374
<KeyboardArrowDownIcon sx={{ fontSize: 16 }} />
7475
</PrimaryAgentButton>

site/src/pages/WorkspacesPage/WorkspacesPageView.tsx

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { Filter } from "./filter/filter"
2121
import { hasError, isApiValidationError } from "api/errors"
2222
import { workspaceFilterQuery } from "utils/filters"
2323
import { SearchBarWithFilter } from "components/SearchBarWithFilter/SearchBarWithFilter"
24+
import Box from "@mui/material/Box"
25+
import Skeleton from "@mui/material/Skeleton"
2426

2527
export const Language = {
2628
pageTitle: "Workspaces",
@@ -143,9 +145,34 @@ export const WorkspacesPageView: FC<
143145
/>
144146
)}
145147
</Stack>
148+
149+
<Box
150+
sx={{
151+
fontSize: 13,
152+
mb: 2,
153+
mt: 1,
154+
color: (theme) => theme.palette.text.secondary,
155+
"& strong": { color: (theme) => theme.palette.text.primary },
156+
}}
157+
>
158+
{workspaces ? (
159+
<>
160+
Showing <strong>{workspaces?.length}</strong> of{" "}
161+
<strong>{count}</strong> workspaces
162+
</>
163+
) : (
164+
<Box sx={{ height: 24, display: "flex", alignItems: "center" }}>
165+
<Skeleton variant="text" width={160} height={16} />
166+
</Box>
167+
)}
168+
</Box>
169+
146170
<WorkspacesTable
147171
workspaces={workspaces}
148-
isUsingFilter={filterProps.filter.query !== ""}
172+
isUsingFilter={
173+
filterProps.filter.query !== "" &&
174+
filterProps.filter.query !== workspaceFilterQuery.me
175+
}
149176
onUpdateWorkspace={onUpdateWorkspace}
150177
error={error}
151178
/>

site/src/pages/WorkspacesPage/filter/filter.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
BaseOption,
3636
} from "./options"
3737
import debounce from "just-debounce-it"
38+
import { workspaceFilterQuery } from "utils/filters"
3839

3940
export type FilterValues = {
4041
owner?: string // User["username"]
@@ -50,7 +51,7 @@ export const useFilter = ({
5051
onUpdate?: () => void
5152
}) => {
5253
const [searchParams, setSearchParams] = searchParamsResult
53-
const query = searchParams.get("filter") ?? ""
54+
const query = searchParams.get("filter") ?? workspaceFilterQuery.me
5455
const values = parseFilterQuery(query)
5556

5657
const update = (values: string | FilterValues) => {

0 commit comments

Comments
 (0)