Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
frontend: fix how the accessory panel opens
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh committed Jan 4, 2024
1 parent 47cad71 commit 2d783d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/packages/app/components/accessory-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function AccessoryContainer({
title?: string
}) {
return (
<Allotment.Pane preferredSize="35%">
<Allotment.Pane preferredSize="35%" maxSize={400} minSize={300}>
{title ? (
<XStack
paddingHorizontal="$4"
Expand Down
8 changes: 6 additions & 2 deletions frontend/packages/app/pages/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ import {AppPublicationContentProvider} from './publication'

export default function GroupPage() {
const route = useNavRoute()
const accessory = route?.accesory
if (route.key !== 'group') throw new Error('Group page needs group route')
const {groupId, version} = route
const group = useGroup(groupId, version, {
Expand Down Expand Up @@ -168,8 +169,11 @@ export default function GroupPage() {
return (
<>
<YStack flex={1} justifyContent="space-between" maxHeight={'100%'}>
<Allotment defaultSizes={[100]}>
<Allotment.Pane>
<Allotment
key={`${accessory}`}
defaultSizes={accessory ? [65, 35] : [100]}
>
<Allotment.Pane minSize={680}>
<MainWrapper maxHeight={'100%'}>
<Container>
<YStack group="header">
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/app/pages/publication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default function PublicationPage() {
key={`${accessory}`}
defaultSizes={accessory ? [65, 35] : [100]}
>
<Allotment.Pane>
<Allotment.Pane minSize={680}>
<YStack height="100%">
<MainWrapper>
<YStack
Expand Down

0 comments on commit 2d783d8

Please sign in to comment.