Repository navigation
Form document: outline, tablet and phone layout - #272
PhilReinking wants to merge 21 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine-phone # Conflicts: # resources/js/components/Factory/Document/QuestionCard.test.ts # resources/js/components/Factory/Document/QuestionCard.vue
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine-phone # Conflicts: # resources/js/components/Factory/Document/QuestionCard.vue # resources/js/components/Factory/Main/ChoiceRowActions.vue # resources/js/components/Factory/Main/ConfigureClicks.vue # resources/js/components/Factory/Shared/Editor.vue
Phone sizes now hold below lg (Greetje's rule), not only below sm. The number gutter is 32 px on phones, so the card gets 16 px back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One CSS rule on the card and the phone's settings sheet: fields and the answer type 44 px tall with 16 px text (iOS zooms into smaller text), 44 px tap areas on switches and file type checkboxes. Group name and group Rules 44 px, Rating's "Use default" 44 px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…andle The outline panel's rows and Close were 32 px on phones and tablets. The phone Settings sheet showed a handle that couldn't be dragged; Done and the scrim close it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 3945f4c. No CI (stacked): Vitest 301, lint, vue-tsc and the build pass locally. Two shoulds inline.
Held in a browser run with 36 questions: a jump by click or Enter opens the question with the cursor in it. The tablet panel keeps focus inside, Esc gives it back, and it closes above 1280 px. On a phone a new question gets its answer field without Settings. ?block= scrolls the question into view.
| <Dialog | ||
| v-else | ||
| :open="settingsOpen" | ||
| :unmount="false" |
There was a problem hiding this comment.
On a phone, Done and Esc close the sheet, but the focus stays on the hidden Done button, so the browser drops it to the page body (a tap on the backdrop is fine). A keyboard or screen reader user starts again at the top of the page. The kept sheet doesn't give the focus back by itself. Maybe give it back when the sheet closes (I haven't run this):
<button
+ ref="settingsButton"
type="button"
+const settingsButton = ref<HTMLButtonElement | null>(null);
+
+// the kept sheet doesn't give the focus back when it closes
+watch(settingsOpen, async (open) => {
+ if (!open && isPhone.value) {
+ await nextTick();
+ settingsButton.value?.focus();
+ }
+});In the Done test, document.activeElement is still Done after the click, so expect(document.activeElement).toBe(settingsButton().element) would catch it.
| <button | ||
| v-else | ||
| type="button" | ||
| class="flex h-8 w-full items-center gap-2 rounded-md pr-2 text-left text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500" |
There was a problem hiding this comment.
On phones and tablets the outline rows are 32 px tall, and from 640 px the panel's close button is 32 px too (sm:h-8 sm:w-8 in FormDocument.vue). The card's controls are 44 px below 1024 px. Same here, with lg:h-8 lg:w-8 on the close button:
| class="flex h-8 w-full items-center gap-2 rounded-md pr-2 text-left text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500" | |
| class="flex h-11 w-full items-center gap-2 rounded-md pr-2 text-left text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 lg:h-8" |
Done and Esc left focus on the hidden sheet, so it fell to the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine-phone # Conflicts: # CHANGELOG.md
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 68235f3 (part a merged in). No CI (stacked), local runs: Vitest 341. The diff without CHANGELOG.md is byte-identical to the reviewed one.
|
Landed in main with #282 (the editor rebuild as one PR); this PR's commits are part of it. |
Part b of the form document: an outline to jump to any question, and a layout that works on tablets and phones. Stacked on #268, so this PR shows only part b.
Part of BITS-282
100dvhfor iPhone Safari.Tested: vitest, lint, vue-tsc, build locally (stacked PR, no CI). By hand at 1440, 1024, 768, 390, 360: 44 px targets, outline jump, no sideways scroll.
Not tested: a real iPhone (
100dvh, zoom), touch, Safari, Firefox, a screen reader.🤖 Generated with Claude Code