Skip to content

Commit a32b76d

Browse files
committed
fix(app): review panel transition
1 parent a52d640 commit a32b76d

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

packages/app/src/pages/session/session-side-panel.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ export function SessionSidePanel(props: {
5555
if (reviewOpen()) return `calc(100% - ${layout.session.width()}px)`
5656
return `${layout.fileTree.width()}px`
5757
})
58-
const reviewWidth = createMemo(() => {
59-
if (!reviewOpen()) return "0px"
60-
if (!fileOpen()) return "100%"
61-
return `calc(100% - ${layout.fileTree.width()}px)`
62-
})
6358
const treeWidth = createMemo(() => (fileOpen() ? `${layout.fileTree.width()}px` : "0px"))
6459

6560
const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined))
@@ -231,9 +226,8 @@ export function SessionSidePanel(props: {
231226
inert={!open()}
232227
class="relative min-w-0 h-full flex shrink-0 overflow-hidden bg-background-base"
233228
classList={{
234-
"opacity-100": open(),
235-
"opacity-0 pointer-events-none": !open(),
236-
"transition-[width,opacity] duration-[240ms] ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
229+
"pointer-events-none": !open(),
230+
"transition-[width] duration-[240ms] ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
237231
!props.size.active(),
238232
}}
239233
style={{ width: panelWidth() }}
@@ -242,14 +236,10 @@ export function SessionSidePanel(props: {
242236
<div
243237
aria-hidden={!reviewOpen()}
244238
inert={!reviewOpen()}
245-
class="relative min-w-0 h-full shrink-0 overflow-hidden bg-background-base"
239+
class="relative min-w-0 h-full flex-1 overflow-hidden bg-background-base"
246240
classList={{
247-
"opacity-100": reviewOpen(),
248-
"opacity-0 pointer-events-none": !reviewOpen(),
249-
"transition-[width,opacity] duration-[240ms] ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
250-
!props.size.active(),
241+
"pointer-events-none": !reviewOpen(),
251242
}}
252-
style={{ width: reviewWidth() }}
253243
>
254244
<div class="size-full min-w-0 h-full bg-background-base">
255245
<DragDropProvider
@@ -385,9 +375,8 @@ export function SessionSidePanel(props: {
385375
inert={!fileOpen()}
386376
class="relative min-w-0 h-full shrink-0 overflow-hidden"
387377
classList={{
388-
"opacity-100": fileOpen(),
389-
"opacity-0 pointer-events-none": !fileOpen(),
390-
"transition-[width,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
378+
"pointer-events-none": !fileOpen(),
379+
"transition-[width] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
391380
!props.size.active(),
392381
}}
393382
style={{ width: treeWidth() }}

0 commit comments

Comments
 (0)