forked from harness/canary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into design-review-fixes-v1
- Loading branch information
Showing
231 changed files
with
20,865 additions
and
18,968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
apps/design-system/src/pages/view-preview/project-settings-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { FC, PropsWithChildren } from 'react' | ||
import { Route } from 'react-router-dom' | ||
|
||
import { ProjectSettingsPage } from '@harnessio/ui/views' | ||
|
||
import RootViewWrapper from './root-view-wrapper' | ||
|
||
const Layout = () => { | ||
return ( | ||
<div className="bg-background-1 sticky top-[55px] z-40"> | ||
<ProjectSettingsPage /> | ||
</div> | ||
) | ||
} | ||
|
||
export const ProjectSettingsWrapper: FC<PropsWithChildren<unknown>> = ({ children }) => { | ||
return ( | ||
<> | ||
<RootViewWrapper asChild> | ||
<Route | ||
path="*" | ||
element={ | ||
<> | ||
<Layout /> | ||
{children} | ||
</> | ||
} | ||
/> | ||
</RootViewWrapper> | ||
</> | ||
) | ||
} |
40 changes: 40 additions & 0 deletions
40
apps/design-system/src/pages/view-preview/pull-request-layout-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { FC, PropsWithChildren, useCallback } from 'react' | ||
import { Route } from 'react-router-dom' | ||
|
||
import { pullRequestStore } from '@subjects/views/pull-request-conversation/pull-request-store' | ||
import { useTranslationsStore } from '@utils/viewUtils' | ||
|
||
import { PullRequestLayout } from '@harnessio/ui/views' | ||
|
||
import RootViewWrapper from './root-view-wrapper' | ||
|
||
const PullRequestLayoutWrapper: FC<PropsWithChildren<unknown>> = ({ children }) => { | ||
const usePullRequestStore = useCallback( | ||
() => ({ | ||
...pullRequestStore | ||
}), | ||
[] | ||
) | ||
return ( | ||
<RootViewWrapper asChild> | ||
<Route | ||
path="*" | ||
element={ | ||
<PullRequestLayout | ||
useTranslationStore={useTranslationsStore} | ||
usePullRequestStore={usePullRequestStore} | ||
spaceId={''} | ||
repoId={''} | ||
updateTitle={() => { | ||
return Promise.resolve() | ||
}} | ||
/> | ||
} | ||
> | ||
<Route path="*" element={children} /> | ||
</Route> | ||
</RootViewWrapper> | ||
) | ||
} | ||
|
||
export default PullRequestLayoutWrapper |
18 changes: 7 additions & 11 deletions
18
apps/design-system/src/pages/view-preview/repo-settings-view-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
import { FC, PropsWithChildren } from 'react' | ||
import { Route, Routes } from 'react-router-dom' | ||
|
||
import { useTranslationsStore } from '@utils/viewUtils' | ||
|
||
import { SandboxLayout, SettingsSidebar } from '@harnessio/ui/views' | ||
import { RepoSettingsLayout } from '@harnessio/ui/views' | ||
|
||
export const RepoSettingsViewWrapper: FC<PropsWithChildren> = ({ children }) => { | ||
const { t } = useTranslationsStore() | ||
|
||
return ( | ||
<SandboxLayout.Main fullWidth> | ||
<SandboxLayout.Columns columnWidths="auto 1fr"> | ||
<SandboxLayout.Column> | ||
<SettingsSidebar t={t} /> | ||
</SandboxLayout.Column> | ||
<SandboxLayout.Column>{children}</SandboxLayout.Column> | ||
</SandboxLayout.Columns> | ||
</SandboxLayout.Main> | ||
<Routes> | ||
<Route path="*" element={<RepoSettingsLayout useTranslationStore={useTranslationsStore} />}> | ||
<Route path="*" element={children} /> | ||
</Route> | ||
</Routes> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
apps/design-system/src/subjects/views/labels/project-labels-list.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { useState } from 'react' | ||
|
||
import { noop, useTranslationsStore } from '@utils/viewUtils' | ||
|
||
import { DeleteAlertDialog } from '@harnessio/ui/components' | ||
import { CreateLabelDialog, ProjectLabelsListView } from '@harnessio/ui/views' | ||
|
||
import { RepoLabelsListStore } from './repo-labels-store' | ||
|
||
export const ProjectLabelsList = () => { | ||
const [openCreateLabelDialog, setOpenCreateLabelDialog] = useState(false) | ||
const [openAlertDeleteDialog, setOpenAlertDeleteDialog] = useState(false) | ||
|
||
return ( | ||
<> | ||
<ProjectLabelsListView | ||
useLabelsStore={RepoLabelsListStore.useLabelsStore} | ||
useTranslationStore={useTranslationsStore} | ||
handleDeleteLabel={() => setOpenAlertDeleteDialog(true)} | ||
handleEditLabel={() => setOpenCreateLabelDialog(true)} | ||
openCreateLabelDialog={() => setOpenCreateLabelDialog(true)} | ||
searchQuery={null} | ||
setSearchQuery={noop} | ||
isLoadingSpaceLabels={false} | ||
/> | ||
<CreateLabelDialog | ||
open={openCreateLabelDialog} | ||
onClose={() => setOpenCreateLabelDialog(false)} | ||
onSubmit={noop} | ||
useTranslationStore={useTranslationsStore} | ||
isCreatingLabel={false} | ||
error={''} | ||
useLabelsStore={RepoLabelsListStore.useLabelsStore} | ||
/> | ||
<DeleteAlertDialog | ||
open={openAlertDeleteDialog} | ||
onClose={() => setOpenAlertDeleteDialog(false)} | ||
identifier={''} | ||
type="label" | ||
deleteFn={noop} | ||
isLoading={false} | ||
useTranslationStore={useTranslationsStore} | ||
/> | ||
</> | ||
) | ||
} |
46 changes: 46 additions & 0 deletions
46
apps/design-system/src/subjects/views/labels/repo-labels-list.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { useState } from 'react' | ||
|
||
import { noop, useTranslationsStore } from '@utils/viewUtils' | ||
|
||
import { DeleteAlertDialog } from '@harnessio/ui/components' | ||
import { CreateLabelDialog, RepoLabelsListView } from '@harnessio/ui/views' | ||
|
||
import { RepoLabelsListStore } from './repo-labels-store' | ||
|
||
export const RepoLabelsList = () => { | ||
const [openCreateLabelDialog, setOpenCreateLabelDialog] = useState(false) | ||
const [openAlertDeleteDialog, setOpenAlertDeleteDialog] = useState(false) | ||
|
||
return ( | ||
<> | ||
<RepoLabelsListView | ||
useLabelsStore={RepoLabelsListStore.useLabelsStore} | ||
useTranslationStore={useTranslationsStore} | ||
handleDeleteLabel={() => setOpenAlertDeleteDialog(true)} | ||
handleEditLabel={() => setOpenCreateLabelDialog(true)} | ||
openCreateLabelDialog={() => setOpenCreateLabelDialog(true)} | ||
searchQuery={null} | ||
setSearchQuery={noop} | ||
isLoadingSpaceLabels={false} | ||
/> | ||
<CreateLabelDialog | ||
open={openCreateLabelDialog} | ||
onClose={() => setOpenCreateLabelDialog(false)} | ||
onSubmit={noop} | ||
useTranslationStore={useTranslationsStore} | ||
isCreatingLabel={false} | ||
error={''} | ||
useLabelsStore={RepoLabelsListStore.useLabelsStore} | ||
/> | ||
<DeleteAlertDialog | ||
open={openAlertDeleteDialog} | ||
onClose={() => setOpenAlertDeleteDialog(false)} | ||
identifier={''} | ||
type="label" | ||
deleteFn={noop} | ||
isLoading={false} | ||
useTranslationStore={useTranslationsStore} | ||
/> | ||
</> | ||
) | ||
} |
Oops, something went wrong.