Skip to content

Commit

Permalink
feat: branches list styles (harness#717)
Browse files Browse the repository at this point in the history
* feat: update styles for branches list

* feat: enhance branch list functionality and UI

* feat: add filters to branch list page and create preview page

* fix: fix lock file after rebasing

* fix: fix types errors

* refactor: refactor branch-list view

* fix: fix linters and types

* feat: reset pnpm-lock

* fix: fix type error

* fix: fixes after review and rebasing

* feat: enhance branch management with search functionality and delete confirmation dialog

- Added search capability for branches in the RepoBranchesListPage.
- Integrated DeleteAlertDialog for branch deletion confirmation.
- Updated RepoBranchListView to support search results and handle branch deletion.
- Improved UI elements for better user experience and accessibility.

* fix: remove aria-describedby prop from CreateBranchDialog

---------

Co-authored-by: americano98 <[email protected]>
  • Loading branch information
iatopilskii and americano98 authored Jan 23, 2025
1 parent 6ca02df commit 4522bb7
Show file tree
Hide file tree
Showing 32 changed files with 1,139 additions and 412 deletions.
6 changes: 6 additions & 0 deletions apps/design-system/src/pages/view-preview/view-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import PullRequestChanges from '@subjects/views/pull-request-conversation/pull-r
import PullRequestCommits from '@subjects/views/pull-request-conversation/pull-request-commits'
import PullRequestConversation from '@subjects/views/pull-request-conversation/pull-request-conversation'
import PullRequestListWrapper from '@subjects/views/pull-request-list/pull-request-list'
import { RepoBranchesView } from '@subjects/views/repo-branches'
import { RepoCommitsView } from '@subjects/views/repo-commits'
import { RepoCreateRule } from '@subjects/views/repo-create-rule'
import { RepoFilesEditView } from '@subjects/views/repo-files/repo-files-edit-view'
Expand Down Expand Up @@ -139,6 +140,11 @@ export const viewPreviews: Record<string, ReactNode> = {
</RepoSettingsViewWrapper>
</RepoViewWrapper>
),
'repo-branches': (
<RepoViewWrapper>
<RepoBranchesView />
</RepoViewWrapper>
),
'general-settings': (
<RepoViewWrapper>
<RepoSettingsViewWrapper>
Expand Down
33 changes: 33 additions & 0 deletions apps/design-system/src/subjects/views/repo-branches/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { useCallback, useState } from 'react'

import { noop, useTranslationsStore } from '@utils/viewUtils'

import { IBranchSelectorStore, RepoBranchListView } from '@harnessio/ui/views'

import { repoBranchesStore } from './repo-branches-store'

export function RepoBranchesView() {
const [isCreateBranchDialogOpen, setCreateBranchDialogOpen] = useState(false)
const useRepoBranchesStore = useCallback((): IBranchSelectorStore => repoBranchesStore, [])

return (
<RepoBranchListView
isLoading={false}
isCreatingBranch={false}
onSubmit={noop}
useRepoBranchesStore={useRepoBranchesStore}
useTranslationStore={useTranslationsStore}
isCreateBranchDialogOpen={isCreateBranchDialogOpen}
setCreateBranchDialogOpen={setCreateBranchDialogOpen}
searchQuery={''}
setSearchQuery={noop}
createBranchError={undefined}
toPullRequest={() => ''}
toBranchRules={() => ''}
toPullRequestCompare={() => ''}
onDeleteBranch={noop}
searchBranches={[]}
setCreateBranchSearchQuery={noop}
/>
)
}
Loading

0 comments on commit 4522bb7

Please sign in to comment.