Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/UnisonShare/Page/ProjectBranchesPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ fetchBranches appContext projectRef kind query cursor =
params =
{ kind = kind
, searchQuery = query
, limit = 100
, limit = 32
, cursor = cursor
}

Expand Down Expand Up @@ -473,7 +473,7 @@ viewAt appContext branch =
tooltip


viewPaginationControls : ProjectRef -> { prev : Maybe Paginated.PageCursor, next : Maybe Paginated.PageCursor } -> Html msg
viewPaginationControls : ProjectRef -> { a | prev : Maybe Paginated.PageCursor, next : Maybe Paginated.PageCursor } -> Html msg
viewPaginationControls projectRef cursors =
let
toLink cursor =
Expand Down Expand Up @@ -552,11 +552,13 @@ tabList appContext projectRef tab =
viewBranches : AppContext -> ProjectDetails -> Branches -> String -> Html Msg
viewBranches appContext project branches emptyStateMessage =
let
viewCard (Paginated { items }) =
items
viewCard (Paginated p) =
p.items
|> List.map (viewBranchRow appContext project)
|> div [ class "project-branches_list" ]
|> List.singleton
|> (\branchList ->
[ div [ class "project-branches_paginated-list" ] [ branchList, viewPaginationControls project.ref p ] ]
)
|> Card.card
|> Card.asContained
|> Card.view
Expand Down
2 changes: 1 addition & 1 deletion src/UnisonShare/Paginated.elm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ toQueryParams param =
|> Maybe.withDefault []


view : (PageCursorParam -> Click msg) -> { prev : Maybe PageCursor, next : Maybe PageCursor } -> Html msg
view : (PageCursorParam -> Click msg) -> { a | prev : Maybe PageCursor, next : Maybe PageCursor } -> Html msg
view toClick cursors =
let
paginationButton icon click =
Expand Down
7 changes: 7 additions & 0 deletions src/css/unison-share/page/project-branches-page.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.project-branches-page .project-branches_paginated-list {
display: flex;
flex-direction: column;
width: 100%;
gap: 0.5rem;
}

.project-branches-page .project-branches_list {
display: flex;
flex-direction: column;
Expand Down
Loading