Mobile compliance: Safari Storybook testing and a Capacitor reference app
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- documentation, frontend, mobile, testing
Direzione di ricerca
Start with src/components/Textarea/Textarea.stories.tsx, tests/mobile/README.md, and the measurements in PRs #842 and #843; most implementation work is already underway there. Verify the story-root and fixture width caps in the browser and mobile suites before adding the requested Capacitor reference app. Done means documented Capacitor setup plus recorded Safari/iOS checks at the listed portrait and landscape widths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem and reported evidence
The reporter supplied an iPhone Safari screenshot of Textarea / Default where the Notes / “Add a note…” field extends beyond the right edge of the visible canvas. The source footer is also cut off. Storybook should provide a reliable way to evaluate controls on a phone, and consumers need a working example of the mobile application setup those controls require.
Reproduction starting point:
- Open the linked story in Safari on an iPhone in portrait orientation.
- Observe the field and surrounding canvas with Safari's browser controls visible.
- Focus the field, enter text, and compare with the keyboard open/closed and after rotation.
The clipping is reported from the supplied screenshot; it has not been independently reproduced for this ticket. Device model, iOS/Safari version, CSS viewport, and zoom state were not supplied and should be recorded during reproduction. Keyboard/rotation checks above are additional test cases, not confirmed failures.
Objective 1: configure and test Storybook for mobile Safari
- Reproduce and isolate the Textarea clipping: distinguish Storybook manager/iframe sizing, decorators/story wrappers, and the component itself. At inspected commit
7aa294d4, the Default story uses a fixedw-96wrapper; investigate this as a possible contributor rather than assume a viewport-meta or component defect. - Audit manager and preview viewport configuration, responsive canvas sizing/padding, safe areas, dynamic viewport height, and Safari toolbar behavior. Ordinary Storybook navigation, canvas, mobile sandbox, and fullscreen preview should remain usable.
- Make Textarea and representative control stories fit narrow screens without clipped fields or unintended document-level horizontal scrolling. Fix the underlying sizing rather than hiding overflowing content. Preserve user zoom and accessible text sizing.
- Extend existing mobile coverage with a Textarea regression and representative text input, select/popover, modal, and composed form interactions. Verify focus, touch targets, keyboard visibility, scrolling to the active field, and overlays within the visible viewport.
Objective 2: create a Capacitor mobile reference app
Provide a runnable Capacitor example with two clearly selectable views:
- Storybook catalog: show the existing component stories inside the mobile app for browsing and testing.
- Bare application page: render representative
@mieweb/uicontrols directly, with no Storybook manager, iframe, runtime, or decorator dependency. Include the reported Textarea case and a small usable form so developers can compare the same controls in both environments.
- Use the library's public imports, required styles, theme/providers, and a responsive application shell. Share example data/composition where practical so Storybook and the bare view exercise comparable controls.
- Demonstrate correct viewport setup, safe-area handling, field sizing, input/focus behavior, keyboard handling, scrolling, and overlay placement in Capacitor's iOS WKWebView. The bare page should also run directly in a browser for comparison with Safari.
- Package the built web assets for the native app; document any development-only live-server configuration separately. The reference build should not depend on a developer's running Storybook server.
- Document clean-checkout install/build/sync/run steps, iOS signing prerequisites, the tested library revision, and how a consumer builds and deploys the example. State platform support and any Android follow-up explicitly.
Acceptance and test evidence
- Verify 320, 375, 390, and 430 CSS-pixel portrait widths plus landscape. Textarea's complete field remains visible and usable, including with long content; any intentionally horizontally scrolling control is documented.
- Record a test matrix for Safari (Storybook and bare page) and Capacitor iOS (catalog and bare page), including expanded/collapsed browser controls where applicable, keyboard open/closed, rotation, and larger text.
- Build on the existing browser and Appium/XCUITest suites, retaining meaningful viewport/bounds assertions and screenshots. Run simulator coverage first, then a physical-iPhone check for native keyboard, focus zoom, and safe-area behavior. Record device/OS, build/commit, results, and untested cases; browser emulation alone is not physical-device evidence.
- Publish the mobile integration guidance with the example and link it from Storybook so consumers can reproduce the supported setup.
Existing work and duplicate check
Searched open and closed issues for mobile, Safari, Capacitor, Textarea, Storybook, and mobile testing. No existing issue was found covering both objectives. Coordinate with these related items:
- #349 — open mobile consistency/policy work; use its guidance rather than establish a competing policy.
- #575 / #621 — closed issue and merged fix for navigation hidden behind iOS browser controls; preserve and regression-test that behavior.
- #540 — merged mobile Storybook sandbox and iPhone Safari tests. Reuse this infrastructure. Its fullscreen/standalone previews still run Storybook fixtures and do not replace the independent bare application page requested here. See existing mobile testing documentation.
- #672 — existing rich-text keyboard/menu focus issue; coordinate component-specific fixes rather than duplicate them here.
Root cause investigation
The clipping reproduces in Chromium at phone width before input focus. Both deployed manager and preview documents already contain width=device-width, initial-scale=1.
The centered preview's intrinsic sizing combines the Textarea fixture's 384px fixed width with 32px of brand-decorator padding and 32px of Storybook-root padding: 448px total. At a 390px viewport the field starts at x=32 and ends at x=416; the source footer follows the expanded parent. The field itself fills its fixture rather than imposing that fixed width.
An isolated diagnostic copy of the deployed assets established that both the centered root and the immediate fixture need a parent-width cap. A root-only cap still leaves 416px of document width; a fixture-only cap leaves 448px. Both caps together produce a 390px document and a fully visible 326px field. The same approach fixes sampled AudioPlayer, Input, Select, QuickLinksCard and Tabs stories at their tested widths while preserving desktop Textarea sizing. Tabs at 320px and the calendar's internal minimum width remain separate component-level cases.
A source audit found 171 candidate outer fixed-width declarations across 52 CSF files; this is a candidate set, not a count of confirmed failing stories. See the updated two-phase plan in PR #842 for measurements, audit boundaries, the few-line shared CSS proposal, and the focused Phase 1 checklist.
These screenshots compare the diagnostic Chromium preview before and after the CSS constraints. They are not a production deployment or iOS-device validation; Safari/native verification remains pending.
Diagnostic before
Diagnostic after
Docs page follow-up
Native Safari testing of the branch preview revealed additional clipping on Textarea Docs (screenshot below). Inline Docs has a separate centered zoom wrapper, so the original story-root cap did not constrain it. On the reported page, a Chromium reproduction measured the primary field beginning at x=-4.5, while raw installation code and the Controls table expanded the document to 607px in a 390px viewport.
Commit 139d63a6 in PR #843 caps the inline zoom wrapper and contains authored code and Controls in local scroll areas. The code and Controls regions are keyboard-focusable and named; native table semantics are preserved. It also moves default fixture caps into Tailwind's base layer so a story's own narrower width utility keeps precedence.
New tests cover Docs at 320/390/430px, initial field visibility before any horizontal scrolling, local code/table keyboard scrolling, manager iframe containment, and unchanged desktop sizing. The local reproduction now has no document-level horizontal overflow. Cloudflare deployed this commit successfully. Retest the updated Docs; the published page was verified in Chromium with no document-level horizontal overflow. Native Safari retesting remains pending.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 7
- Merge medio
- 1g 12h
- PR unite (30g)
- 62
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mieweb/ui
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
src/tailwind-preset.cjs drifted from tailwind-preset.ts — missing `info` and `chart` color scalesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
SuperChatInbox: show the chat pane when the host opens or starts a conversation on small screensForse già presa @martincarapia l’ha presa oggi. Apertaenhancement
mieweb/ui#849 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
simstudioai/sim#10710 ·
I maintainer di solito rispondono entro 1 giorno
-
bug:new
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
callstackincubator/simlock#2088 ·
I maintainer di solito rispondono entro 1 giorno
-
Make the HTTP server's keep-alive and headers timeouts configurableForse già presa @mattgodbolt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9902 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno