Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): expanding stacked notices no longer scrolls a working thread #20086

Mergedderektrimm(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/20086/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 42 additions and 1 deletion (loading 1).

x
0 of 4 viewed, 4 left
1 addition and 0 deletionsapps/web/src/components/chat/ComposerBannerStack.tsxModified
View file
@@ -121,6 +121,7 @@
{hasStack ? (
<div
ref={noticesRef}
+ data-composer-banner-stack="true"
data-chat-composer-collapsed-controls="true"
className={cn("relative z-20 min-h-3", stackExpanded && "z-50")}
onPointerEnter={(event) => {
12 additions and 1 deletionapps/web/src/components/ChatView.tsxModified
View file
@@ -4668,11 +4668,22 @@
modelStrip.offsetHeight + Number.parseFloat(getComputedStyle(modelStrip).marginTop),
+ const noticeStack = composerOverlayElement?.querySelector<HTMLElement>(
+ '[data-composer-banner-stack="true"]',
+ );
+ const expandedNoticesHeight = noticeStack
+ ? Math.max(
+ 0,
+ noticeStack.getBoundingClientRect().height -
+ Number.parseFloat(getComputedStyle(noticeStack).minHeight),
+ )
+ : 0;
const nextInset = resolveComposerTimelineInset({
currentInset: composerTimelineInsetRef.current,
- overlayHeight: nextHeight,
+ overlayHeight: height,