cleanup(app): wrap entire MessageTimeline in ScrollView
This commit is contained in:
parent
e1ed51b7fc
commit
f9248e8faa
1 changed files with 38 additions and 43 deletions
|
|
@ -1163,8 +1163,17 @@ export function MessageTimeline(props: {
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<ScrollView
|
||||||
class="relative min-w-0 w-full h-full flex flex-col"
|
viewportRef={bindListRoot}
|
||||||
|
onWheel={handleListWheel}
|
||||||
|
onTouchStart={handleListTouchStart}
|
||||||
|
onTouchMove={handleListTouchMove}
|
||||||
|
onTouchEnd={handleListTouchEnd}
|
||||||
|
onTouchCancel={handleListTouchEnd}
|
||||||
|
onPointerDown={handleListPointerDown}
|
||||||
|
onScroll={handleListScroll}
|
||||||
|
onClick={props.onAutoScrollInteraction}
|
||||||
|
class="relative min-w-0 w-full h-full"
|
||||||
style={{
|
style={{
|
||||||
"--session-title-height": showHeader() ? "40px" : "0px",
|
"--session-title-height": showHeader() ? "40px" : "0px",
|
||||||
"--sticky-accordion-top": showHeader() ? "48px" : "0px",
|
"--sticky-accordion-top": showHeader() ? "48px" : "0px",
|
||||||
|
|
@ -1179,7 +1188,6 @@ export function MessageTimeline(props: {
|
||||||
data-session-title
|
data-session-title
|
||||||
classList={{
|
classList={{
|
||||||
"sticky top-0 z-30 bg-[linear-gradient(to_bottom,var(--background-stronger)_48px,transparent)]": true,
|
"sticky top-0 z-30 bg-[linear-gradient(to_bottom,var(--background-stronger)_48px,transparent)]": true,
|
||||||
relative: true,
|
|
||||||
"w-full": true,
|
"w-full": true,
|
||||||
"pb-4": true,
|
"pb-4": true,
|
||||||
"pl-2 pr-3 md:pl-4 md:pr-3": true,
|
"pl-2 pr-3 md:pl-4 md:pr-3": true,
|
||||||
|
|
@ -1460,18 +1468,6 @@ export function MessageTimeline(props: {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<ScrollView
|
|
||||||
viewportRef={bindListRoot}
|
|
||||||
onWheel={handleListWheel}
|
|
||||||
onTouchStart={handleListTouchStart}
|
|
||||||
onTouchMove={handleListTouchMove}
|
|
||||||
onTouchEnd={handleListTouchEnd}
|
|
||||||
onTouchCancel={handleListTouchEnd}
|
|
||||||
onPointerDown={handleListPointerDown}
|
|
||||||
onScroll={handleListScroll}
|
|
||||||
onClick={props.onAutoScrollInteraction}
|
|
||||||
class="relative min-w-0 w-full h-full"
|
|
||||||
>
|
|
||||||
<Show when={scrollRoot()}>
|
<Show when={scrollRoot()}>
|
||||||
{(root) => (
|
{(root) => (
|
||||||
<Virtualizer
|
<Virtualizer
|
||||||
|
|
@ -1500,6 +1496,5 @@ export function MessageTimeline(props: {
|
||||||
</Show>
|
</Show>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue