diff --git a/components/dashboard/src/app/AppRoutes.tsx b/components/dashboard/src/app/AppRoutes.tsx index cab204021a6294..a7c2b58f78e2d8 100644 --- a/components/dashboard/src/app/AppRoutes.tsx +++ b/components/dashboard/src/app/AppRoutes.tsx @@ -39,6 +39,7 @@ import PersonalAccessTokenCreateView from "../user-settings/PersonalAccessTokens import { CreateWorkspacePage } from "../workspaces/CreateWorkspacePage"; import { WebsocketClients } from "./WebsocketClients"; import { BlockedEmailDomains } from "../admin/BlockedEmailDomains"; +import { useFeatureFlag } from "../data/featureflag-query"; const Workspaces = React.lazy(() => import(/* webpackPrefetch: true */ "../workspaces/Workspaces")); const Account = React.lazy(() => import(/* webpackPrefetch: true */ "../user-settings/Account")); @@ -75,12 +76,17 @@ const WorkspacesSearch = React.lazy(() => import(/* webpackPrefetch: true */ ".. const ProjectsSearch = React.lazy(() => import(/* webpackPrefetch: true */ "../admin/ProjectsSearch")); const TeamsSearch = React.lazy(() => import(/* webpackPrefetch: true */ "../admin/TeamsSearch")); const Usage = React.lazy(() => import(/* webpackPrefetch: true */ "../Usage")); +const RepositoryListPage = React.lazy(() => import(/* webpackPrefetch: true */ "../repositories/list/RepositoryList")); +const RepositoryDetailPage = React.lazy( + () => import(/* webpackPrefetch: true */ "../repositories/detail/RepositoryDetail"), +); export const AppRoutes = () => { const hash = getURLHash(); const user = useCurrentUser(); const [isWhatsNewShown, setWhatsNewShown] = useState(user && shouldSeeWhatsNew(user)); const location = useLocation(); + const repoConfigListAndDetail = useFeatureFlag("repoConfigListAndDetail"); // TODO: Add a Route for this instead of inspecting location manually if (location.pathname.startsWith("/blocked")) { @@ -207,6 +213,13 @@ export const AppRoutes = () => { + + {repoConfigListAndDetail && ( + <> + + + + )} {/* basic redirect for old team slugs */} diff --git a/components/dashboard/src/data/featureflag-query.ts b/components/dashboard/src/data/featureflag-query.ts index 74bfff814b1750..0e83fec478051c 100644 --- a/components/dashboard/src/data/featureflag-query.ts +++ b/components/dashboard/src/data/featureflag-query.ts @@ -27,6 +27,7 @@ const featureFlags = { newProjectIncrementalRepoSearchBBS: false, includeProjectsOnCreateWorkspace: false, repositoryFinderSearch: false, + repoConfigListAndDetail: false, }; type FeatureFlags = typeof featureFlags; diff --git a/components/dashboard/src/repositories/detail/RepositoryDetail.tsx b/components/dashboard/src/repositories/detail/RepositoryDetail.tsx new file mode 100644 index 00000000000000..1d58d7698a7c27 --- /dev/null +++ b/components/dashboard/src/repositories/detail/RepositoryDetail.tsx @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +import { FC } from "react"; +import Header from "../../components/Header"; +import { useParams } from "react-router"; + +type PageRouteParams = { + id: string; +}; +const RepositoryDetailPage: FC = () => { + const { id } = useParams(); + + return ( + <> +
+
+ id: {id} +
+ + ); +}; + +export default RepositoryDetailPage; diff --git a/components/dashboard/src/repositories/list/RepositoryList.tsx b/components/dashboard/src/repositories/list/RepositoryList.tsx new file mode 100644 index 00000000000000..4f2a3c9eb5b89a --- /dev/null +++ b/components/dashboard/src/repositories/list/RepositoryList.tsx @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +import { FC } from "react"; +import Header from "../../components/Header"; + +const RepositoryListPage: FC = () => { + return ( + <> +
+ + ); +}; + +export default RepositoryListPage;