Reserve space for inline thread details panel
- Move the inline thread panel to an absolute overlay - Add shared inset styling so the timeline and composer avoid overlap - Rename composer glass styling to the shared floating surface class
This commit is contained in:
1 parent
4be1e0fe13
commit
1a03d3232e
5 files changed
+68
-45
No files matched your search
@@ -1656,6 +1656,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
threadPanelPresentation,
|
||||
),
|
||||
);
|
||||
const inlineThreadPanelOpen = threadPanelOpen && threadPanelPresentation === "inline";
|
||||
|
||||
useEffect(() => {
|
||||
if (!activeThreadRef) return;
|
||||
@@ -6486,7 +6487,10 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
}}
|
||||
/>
|
||||
{/* Main content area with optional plan sidebar */}
|
||||
<div className="flex min-h-0 min-w-0 flex-1">
|
||||
<div
|
||||
className="relative flex min-h-0 min-w-0 flex-1"
|
||||
data-thread-details-inline-reserved={inlineThreadPanelOpen ? "true" : undefined}
|
||||
>
|
||||
{/* Chat column */}
|
||||
<div className="relative flex min-h-0 min-w-0 flex-1 flex-col">
|
||||
{/* Provider status overlays the timeline without changing its content height. */}
|
||||
@@ -6540,7 +6544,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
{/* scroll to end pill — shown when user has scrolled away from the live edge */}
|
||||
{showScrollToBottom && (
|
||||
<div
|
||||
className="pointer-events-none absolute left-1/2 z-30 flex -translate-x-1/2 justify-center py-1.5"
|
||||
className="chat-scroll-to-bottom pointer-events-none absolute z-30 flex justify-center py-1.5"
|
||||
style={{ bottom: composerOverlayHeight + 4 }}
|
||||
>
|
||||
<button
|
||||
@@ -6720,7 +6724,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
) : null}
|
||||
</div>
|
||||
{/* end chat column */}
|
||||
{threadPanelOpen && threadPanelPresentation === "inline" ? (
|
||||
{inlineThreadPanelOpen ? (
|
||||
<ThreadDetailsPanel mode="inline" {...threadDetailsPanelProps} />
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -2692,9 +2692,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
ref={composerSurfaceRef}
|
||||
data-chat-composer-mobile-collapsed={isComposerCollapsedMobile ? "true" : "false"}
|
||||
className={cn(
|
||||
"rounded-[20px] transition-[background-color] duration-200",
|
||||
isDragOverComposer ? "bg-accent/45 ring-1 ring-primary/70" : null,
|
||||
projectSelectionRequired ? "opacity-75" : null,
|
||||
"floating-glass-surface rounded-[20px] border transition-colors duration-200 has-focus-visible:border-ring/45",
|
||||
isDragOverComposer ? "border-primary/70 bg-accent/45" : "border-border",
|
||||
environmentUnavailable ? "opacity-75" : null,
|
||||
composerProviderState.composerSurfaceClassName,
|
||||
)}
|
||||
onFocusCapture={(event) => {
|
||||
|
||||
@@ -630,7 +630,7 @@ export const MessagesTimeline = memo(function MessagesTimeline({
|
||||
maintainScrollAtEndThreshold={0.1}
|
||||
maintainVisibleContentPosition
|
||||
onScroll={handleScroll}
|
||||
className="scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain px-3 sm:px-5"
|
||||
className="messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain"
|
||||
ListHeaderComponent={listHeader}
|
||||
ListFooterComponent={TIMELINE_LIST_FOOTER}
|
||||
/>
|
||||
|
||||
@@ -131,7 +131,12 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
|
||||
|
||||
const card = (
|
||||
<div
|
||||
className="overflow-hidden rounded-[18px] border border-border/75 bg-card/95 shadow-[0_8px_28px_rgba(0,0,0,0.045)] dark:shadow-[0_12px_30px_rgba(0,0,0,0.18)]"
|
||||
className={cn(
|
||||
"floating-glass-surface overflow-x-hidden rounded-[20px] border border-border/75",
|
||||
props.mode === "inline"
|
||||
? "max-h-full overflow-y-auto overscroll-contain [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
||||
: "overflow-y-hidden",
|
||||
)}
|
||||
data-thread-details-card
|
||||
>
|
||||
<section aria-labelledby="thread-details-project-heading">
|
||||
@@ -285,7 +290,7 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
|
||||
return (
|
||||
<aside
|
||||
aria-label="Thread details"
|
||||
className="w-[clamp(18rem,24vw,21rem)] shrink-0 overflow-y-auto bg-background p-3 pl-0"
|
||||
className="absolute inset-y-0 right-[var(--app-scrollbar-width)] z-20 w-[var(--thread-details-panel-width)] p-3"
|
||||
data-thread-details-panel="inline"
|
||||
>
|
||||
{card}
|
||||
|
||||
+50
-36
@@ -102,6 +102,8 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
--workspace-native-controls-inset: 0px;
|
||||
--workspace-titlebar-control-size: 1.75rem;
|
||||
--workspace-titlebar-control-gap: 0.75rem;
|
||||
--thread-details-panel-width: clamp(18rem, 24vw, 21rem);
|
||||
--thread-details-panel-inset: 0px;
|
||||
}
|
||||
|
||||
.dark {
|
||||
@@ -640,15 +642,38 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.chat-composer-horizontal-inset {
|
||||
padding-inline-start: calc(env(safe-area-inset-left) + 0.75rem);
|
||||
padding-inline-end: calc(env(safe-area-inset-right) + 0.75rem);
|
||||
[data-thread-details-inline-reserved="true"] {
|
||||
--thread-details-panel-inset: var(--thread-details-panel-width);
|
||||
}
|
||||
|
||||
.chat-composer-glass {
|
||||
background: color-mix(in srgb, var(--background) var(--glass-opacity), transparent);
|
||||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
||||
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
||||
.messages-timeline-scroll {
|
||||
padding-inline-start: 0.75rem;
|
||||
padding-inline-end: calc(0.75rem + var(--thread-details-panel-inset));
|
||||
}
|
||||
|
||||
.chat-scroll-to-bottom {
|
||||
inset-inline-start: 0;
|
||||
inset-inline-end: var(--thread-details-panel-inset);
|
||||
}
|
||||
|
||||
.chat-composer-horizontal-inset {
|
||||
padding-inline-start: calc(env(safe-area-inset-left) + 0.75rem);
|
||||
padding-inline-end: calc(
|
||||
env(safe-area-inset-right) + 0.75rem + var(--thread-details-panel-inset)
|
||||
);
|
||||
}
|
||||
|
||||
.floating-glass-surface,
|
||||
.chat-composer-lower-chrome {
|
||||
background: color-mix(in srgb, var(--card) 20%, transparent);
|
||||
}
|
||||
|
||||
.floating-glass-surface {
|
||||
box-shadow:
|
||||
0 18px 48px -20px rgb(0 0 0 / 28%),
|
||||
0 4px 14px -7px rgb(0 0 0 / 22%);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.chat-composer-glass-shell {
|
||||
@@ -659,24 +684,15 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.chat-composer-glass-shell::before {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
inset: 0;
|
||||
border-radius: 22px;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--chat-composer-glass-surface) var(--glass-opacity),
|
||||
transparent
|
||||
);
|
||||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
||||
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
||||
content: "";
|
||||
.dark .floating-glass-surface,
|
||||
.dark .chat-composer-lower-chrome {
|
||||
background: color-mix(in srgb, var(--card) 45%, transparent);
|
||||
}
|
||||
|
||||
.chat-composer-glass-shell-with-context {
|
||||
--chat-composer-context-extension: 2.25rem;
|
||||
.dark .floating-glass-surface {
|
||||
box-shadow:
|
||||
0 18px 48px -20px rgb(0 0 0 / 60%),
|
||||
0 4px 14px -7px rgb(0 0 0 / 40%);
|
||||
}
|
||||
|
||||
.chat-composer-glass-shell-with-context::before {
|
||||
@@ -1027,25 +1043,23 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
--topbar-scroll-fade-height: 3rem;
|
||||
}
|
||||
|
||||
.messages-timeline-scroll {
|
||||
padding-inline-start: 1.25rem;
|
||||
padding-inline-end: calc(1.25rem + var(--thread-details-panel-inset));
|
||||
}
|
||||
|
||||
.chat-composer-horizontal-inset {
|
||||
padding-inline-start: calc(env(safe-area-inset-left) + 1.25rem);
|
||||
padding-inline-end: calc(env(safe-area-inset-right) + 1.25rem);
|
||||
padding-inline-end: calc(
|
||||
env(safe-area-inset-right) + 1.25rem + var(--thread-details-panel-inset)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
|
||||
.chat-composer-glass,
|
||||
.alert-glass {
|
||||
background: var(--background) !important;
|
||||
}
|
||||
|
||||
.chat-composer-glass-shell::before {
|
||||
background: var(--chat-composer-glass-surface);
|
||||
}
|
||||
|
||||
.dialog-glass,
|
||||
.dropdown-glass {
|
||||
background: var(--popover) !important;
|
||||
.floating-glass-surface,
|
||||
.chat-composer-lower-chrome {
|
||||
background: var(--card);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user