fix: type the health test mode, pace cards with the stream, and size the results panel
This commit is contained in:
parent
fa356ba5c5
commit
cdace7d170
7 changed files with 41 additions and 15 deletions
|
|
@ -17,12 +17,7 @@ const regionLabel = computed(() =>
|
|||
|
||||
<template>
|
||||
<div class="set" role="region" :aria-label="regionLabel" tabindex="0">
|
||||
<TrackCard
|
||||
v-for="(event, index) in tracks"
|
||||
:key="event.track.id"
|
||||
:event="event"
|
||||
:style="`--card-order: ${index}`"
|
||||
/>
|
||||
<TrackCard v-for="event in tracks" :key="event.track.id" :event="event" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -31,7 +26,8 @@ const regionLabel = computed(() =>
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--s-2);
|
||||
max-height: min(42dvh, 480px);
|
||||
/* Roughly 5.5 cards tall: the half card signals there is more to scroll. */
|
||||
max-height: min(66dvh, 610px);
|
||||
padding: var(--s-2) var(--s-3) var(--s-2) 0;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior-y: contain;
|
||||
|
|
@ -42,7 +38,7 @@ const regionLabel = computed(() =>
|
|||
|
||||
@media (max-width: 560px) {
|
||||
.set {
|
||||
max-height: min(34dvh, 360px);
|
||||
max-height: min(52dvh, 470px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ const artworkAlt = computed(() =>
|
|||
border-color var(--dur-fast) ease,
|
||||
background var(--dur-fast) ease;
|
||||
animation: card-in var(--dur-card) var(--ease) both;
|
||||
animation-delay: calc(var(--card-order, 0) * var(--dur-card-stagger));
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
--ease: cubic-bezier(0.2, 0.8, 0.3, 1);
|
||||
--dur-fast: 0.16s;
|
||||
--dur-card: 0.4s;
|
||||
--dur-card-stagger: 0.08s;
|
||||
--dur-reduced-motion: 0.001s;
|
||||
|
||||
color-scheme: dark;
|
||||
|
|
|
|||
|
|
@ -104,12 +104,13 @@ describe('result presentation', () => {
|
|||
expect(region?.contains(action ?? null)).toBe(false)
|
||||
})
|
||||
|
||||
it('assigns a deliberate stagger order to arriving cards', () => {
|
||||
it('renders arriving cards without an artificial entrance delay', () => {
|
||||
const root = mountComponent(AssistantMessage, { turn: doneTurn(), canSave: true })
|
||||
const cards = root.querySelectorAll<HTMLElement>('article')
|
||||
|
||||
expect(cards[0]?.style.getPropertyValue('--card-order')).toBe('0')
|
||||
expect(cards[1]?.style.getPropertyValue('--card-order')).toBe('1')
|
||||
expect(cards.length).toBeGreaterThan(1)
|
||||
expect(cards[0]?.style.getPropertyValue('--card-order')).toBe('')
|
||||
expect(cards[1]?.style.getPropertyValue('--card-order')).toBe('')
|
||||
})
|
||||
|
||||
it('anchors a completed response at the top of the conversation viewport', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue