Repository navigation
fix(agent): move quick chips into the conversation on short screens - #74
Merged
Merged
Conversation
At 200% text in English with a wide font such as DejaVu Sans, the quick chips above the input wrap into four two-line rows. Together with the chat header, the fixed regions then leave 28px of the 839px Pixel 7 screen to the conversation, so results such as "Open template: Water bills" cannot be tapped wherever they scroll. Render the chips both above the input and after the conversation through a new QuickChips component, with the same visibility rules. When the shell is shorter than 36rem, the limit composerCompact already uses, a size container query shows the copy after the conversation instead, so the chips scroll with the content. Unlike in media queries, rem in a container query follows the page's text size, so the in-app setting, browser zoom and system text size all count. On Pixel 7 the conversation gets 546px at 200% in English with Verdana (was 28px) and 595px in Chinese (was 217px). Portrait screens at 100% and 125% are unchanged; a phone on its side is under 36rem even at 100%, so it shows the chips after the conversation too. The bill e2e forces Verdana, navigates at 200% again instead of resetting the text size, and checks in both languages that the conversation keeps over half of the screen and that the chips after it work. The accessibility checklist gains the rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什麼、為什麼
At 200% text in English with a wide font such as DejaVu Sans (the font on the Linux CI runner), the quick chips above the input wrap into four two-line rows. Together with the chat header, the fixed regions then leave 28px of the 839px Pixel 7 screen to the conversation, so result links such as "Open template: Water bills" cannot be tapped wherever they scroll (WCAG 1.4.4, 1.4.10). #73 worked around this in the bill e2e by resetting the text size before navigating and listed the layout fix as a follow-up; this is that fix.
QuickChipscomponent renders the chips twice, above the input and after the conversation, with the same visibility rules as before..assistant-shellis now a size container. When it is shorter than 36rem, the limitcomposerCompactalready uses,@container assistant-shell (height < 36rem)hides the copy in the dock and shows the one after the conversation, which scrolls with the content. Unlike in media queries,remin a container query follows the page's text size, so the in-app setting, browser zoom and the system text size all count.Conversation height between the header and the dock, Pixel 7 profile (412×839), bill results:
Phones held sideways (839×412) are under 36rem even at 100%, so they show the chips after the conversation too, leaving it 275px instead of about 216px. This is intended.
如何驗證
Run on
df16f6f(macOS) before rebasing onto4f533b4; the rebased783817ehas the same tree.frontend/agent-mvp:pnpm lint,pnpm format:checkandpnpm buildpass;pnpm test585 passed;pnpm test:e2e73 passedapp.e2e.ts:174) now forces Verdana, navigates at 200% instead of resetting the text size, and checks in both languages that the conversation keeps more than half of the screen, that the dock copy of the chips is hidden and that the copy after the conversation works. Against the previous layout it fails at the first check (0.26 of the screen in Chinese).Checklist
fvm flutter analyze/fvm flutter test;前端:pnpm lint/pnpm test)min-height: 48px; not checked with TalkBack or on Android)相關 issue(若有)
Follow-up to #73.