Skip to content

Commit e86207e

Browse files
committed
chore: reorganize files
1 parent 2b13f1e commit e86207e

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

site/src/components/WorkspacesButton/OverflowY.tsx renamed to site/src/components/OverflowY/OverflowY.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* @file Provides reusable vertical overflow behavior.
3+
*/
14
import { type ReactNode } from "react";
25
import { type SystemStyleObject } from "@mui/system";
36
import Box from "@mui/system/Box";

site/src/components/WorkspacesButton/PopoverContainer.tsx renamed to site/src/components/PopoverContainer/PopoverContainer.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @file Abstracts over MUI's Popover component to simplify using it (and hide)
3+
* some of the wonkier parts of the API.
4+
*
5+
* Just place a button and some content in the component, and things just work.
6+
* No setup needed with hooks or refs.
7+
*/
18
import {
29
type KeyboardEvent,
310
type ReactElement,

site/src/components/WorkspacesButton/WorkspacesButton.tsx renamed to site/src/pages/WorkspacesPage/WorkspacesButton.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ import { useOrganizationId, usePermissions } from "hooks";
44
import { useQuery } from "@tanstack/react-query";
55
import { type Template } from "api/typesGenerated";
66
import { templates } from "api/queries/templates";
7+
78
import { Link as RouterLink } from "react-router-dom";
89
import Box from "@mui/system/Box";
910
import Button from "@mui/material/Button";
1011
import Link from "@mui/material/Link";
1112
import AddIcon from "@mui/icons-material/AddOutlined";
1213
import OpenIcon from "@mui/icons-material/OpenInNewOutlined";
14+
1315
import { Loader } from "components/Loader/Loader";
14-
import { PopoverContainer } from "./PopoverContainer";
15-
import { OverflowY } from "./OverflowY";
16-
import { SearchBox } from "./SearchBox";
16+
import { PopoverContainer } from "components/PopoverContainer/PopoverContainer";
17+
import { OverflowY } from "components/OverflowY/OverflowY";
1718
import { EmptyState } from "components/EmptyState/EmptyState";
1819
import { Avatar } from "components/Avatar/Avatar";
20+
import { SearchBox } from "./WorkspacesSearchBox";
1921

2022
const ICON_SIZE = 18;
2123
const COLUMN_GAP = 1.5;

site/src/pages/WorkspacesPage/WorkspacesPageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
import Box from "@mui/material/Box";
1919
import Button from "@mui/material/Button";
2020
import DeleteOutlined from "@mui/icons-material/DeleteOutlined";
21-
import { WorkspacesButton } from "components/WorkspacesButton/WorkspacesButton";
21+
import { WorkspacesButton } from "./WorkspacesButton";
2222

2323
export const Language = {
2424
pageTitle: "Workspaces",

site/src/components/WorkspacesButton/SearchBox.tsx renamed to site/src/pages/WorkspacesPage/WorkspacesSearchBox.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* @file Defines a controlled searchbox component for processing form state.
3+
*
4+
* Not defined as a top-level component just yet, because it's not clear how
5+
* reusable this is outside of workspace dropdowns.
6+
*/
17
import {
28
type ForwardedRef,
39
type KeyboardEvent,

0 commit comments

Comments
 (0)