The user wants a plan for a "cross-platform design lab."
The goal of this lab is to verify "parity" (visual and functional consistency) between "native iOS/Android" apps and a "PWA" (Progressive Web App).
A key constraint is enforcing "gesture conventions."
1. Deconstruct the Request:
- Objective: Verify Parity (UI/UX consistency) + Enforce Gesture Conventions.
- Platforms: iOS (Native), Android (Native), PWA (Web).
- Format: A plan for a "Design Lab" (a structured environment/process for testing).
2. Identify Key Challenges:
- Parity: Web (PWA) often lags behind Native in feel, performance, and access to specific hardware features.
- Gestures: iOS and Android have conflicting gesture standards (e.g., Back swipe, Context menus, Pull to refresh).
- PWA Limitations: Haptics, 3D Touch, specific scroll physics, and browser UI overlay issues.
3. Structure the Plan:
A logical flow for a Design Lab would be:
- Phase 1: Setup & Governance (Defining the rules).
- Phase 2: The Component Library (The atoms).
- Phase 3: The Interaction Lab (The gestures/motion).
- Phase 4: The Testing Protocol (Verification).
- Phase 5: Feedback & Iteration.
4. Flesh out specific sections:
-
Phase 1: Governance: Need to decide on a design system. "Adaptive" vs. "Replica." Usually, "Adaptive" is better (respecting platform norms), but "Parity" implies a consistent brand. Let's aim for Functional Parity with Platform-Conformant Gestures.
- Key Concept: "The 80/20 Rule of Parity" (Core flows identical, edge cases native).
-
Phase 2: UI Parity (The Look):
- Typography, Color, Icons (SF Symbols vs. Material Icons vs. SVG).
- Input fields (date pickers differ wildly).
- Navigation bars (Bottom tabs are standard, but top bars differ).
-
Phase 3: Gesture Conventions (The Feel):
- This is the critical constraint.
- The Conflict: Android uses a distinct "Back" gesture (swipe from edge). iOS uses "Back" swipe (from left edge anywhere). PWA needs to decide which to mimic or if it supports both.
- Swipe to Action: iOS (Delete) vs. Android (Contextual menu usually, or swipe to delete in lists).
- Pull to Refresh: Native feels distinct. PWA needs CSS overscroll-behavior.
- Haptics: PWA supports Vibration API, but it's not 1:1 with Core Haptics.
-
Phase 4: The Lab Environment (The Physical Setup):
- Hardware needed (iPhones, Pixels, mid-range Androids).
- Network conditions (Throttling for PWA performance).
-
Phase 5: Verification Matrix:
- Create a scorecard.
- Accessibility (Screen readers: VoiceOver vs. TalkBack vs. Web Vitals).
5. Refine the "Gesture Convention" aspect:
The prompt specifically asks to enforce gesture conventions.
- iOS: Swipe back (bezel), Peek/Pop (limited support on web), Long Press (context menu).
- Android: Bezel swipe (back), Pull-to-refresh (standard), Long Press (hover/preview).
- PWA Strategy: The PWA needs to detect the user agent or default to a hybrid "Web" standard that doesn't break native muscle memory.
- Crucial check: Does the PWA accidentally trap the "Back" scroll gesture?
6. Drafting the Content (Iterative refinement):
- Intro: Define the scope. It's not just "looking the same," it's "feeling the same."
- Step 1: The Taxonomy. Group elements.
- Step 2: The "Gesture" Treaty. This is the most unique part. How do we handle the "Back" gesture conflict? (e.g., iOS allows swiping anywhere on the content; Android often requires the edge).
- Step 3: The Testing Grid.
- Step 4: Automation/Tooling.
7. Adding "Pro-Tips" / "Gotchas":
- Scroll chaining: A nightmare in PWAs inside nested divs.
- Keyboard handling: iOS vs. Android viewport resizing.
- Safe Areas: The notch/dynamic island handling in PWA vs Native.
8. Final Polish: Use professional formatting. Clear headings. Actionable bullet points. Make it sound like a structured engineering/design proposal.
(Self-Correction during drafting): Make sure not to just list features. This is a Lab Plan. It needs a procedure. "How do we run this lab?"
Revised Structure:
- Lab Objective: Define "Functional Parity" vs "Pixel Perfection."
- Infrastructure: The "Device Wall."
- The "Gesture Treaty" (Rules of Engagement): Defining how gestures map.
- The Verification Matrix: The actual test cases.
- Edge Case Handling: Keyboards, Biometrics, Offline.
- Reporting: Success metrics.
Let's write it out.
This plan outlines a Cross-Platform Parity Lab. The goal of this lab is not to make the PWA look identical to the native apps (which often leads to a poor user experience), but to ensure functional equivalence and brand consistency while strictly adhering to the specific interaction patterns of iOS, Android, and the Web.
Lab Objective
To validate that a user can switch between Native iOS, Native Android, and PWA surfaces without encountering "interaction friction" (gestures not working as expected) or "visual dissonance" (UI components behaving differently).
Phase 1: The "Gesture Treaty" (Governance)
Before testing begins, you must define how gestures map across platforms. A "write once, run everywhere" approach to gestures fails.
1. Define the Navigation Model
- Global Back Action:
- Android: Hardware/Software back button (bottom gesture bar) + Arrow in Header.
- iOS: Swipe-from-edge + Chevron in Header.
- PWA: The Critical Decision. Will you support iOS edge-swipe in the browser? (Usually requires specific CSS
overscroll-behavior logic).
- Overscroll (The "Bounce" & "Glow"):
- iOS: Rubber-banding effect.
- Android: Edge glow/ripple effect.
- PWA: Must simulate the native feel of the host OS (e.g., a PWA on Android should glow, a PWA on iOS should bounce).
2. The Interaction Dictionary
Create a matrix mapping input methods:
- Long Press: Native (Context Menu / Peek & Pop) vs. Web (Hover states on desktop, Context Menu on mobile).
- Pull to Refresh: Standard on Android/niche on iOS (usually lists only). Should the PWA support this?
- Swipe Actions: List items (Archive/Delete).
- iOS: Usually swipe left for "Delete" (red).
- Android: Often distinct icons appearing under the surface.
Phase 2: Infrastructure & Environment
Set up the physical and digital environment for the lab.
1. The "Device Wall"
Do not use emulators for gesture testing. Emulators often map mouse clicks to touch events poorly.
- Hardware:
- iPhone (w/ FaceID & Home Button variants for gesture differences).
- Pixel/Samsung (Android stock vs. OneUI skins).
- iPad/Tablet (Testing split-view and keyboard shortcuts).
- Network: Charles Proxy / Fiddler.
- Use Case: Throttle bandwidth to 3G to see if skeleton screens (parity) appear correctly on all platforms before data loads.
2. Visual Regression Tools
- Percy / Applitools: Configure these to ignore OS-specific UI chrome (status bars, navigation bars) and focus on the App Canvas.
- Storybook: Run a shared Storybook instance where Native components and Web components are rendered side-by-side for code-level review.
Phase 3: The Verification Protocol (Test Cases)
This is the core execution of the lab.
Module A: Atomic Component Parity
Verify that individual UI elements look and behave consistently.
- Input Fields:
- Test: Focus state. Does the border color change? Does the keyboard appear consistently?
- Parity Check: Ensure validation errors appear in real-time on all three platforms.
- System Alerts:
- Test: Permission requests (Camera/Location).
- Parity Check: Native uses System Dialogs. PWA uses Browser Dialogs. Ensure the copy is identical, even if the chrome differs.
- Bottom Sheets / Modals:
- Test: Dismissal gesture.
- Parity Check: Swipe down to dismiss. On PWA, ensure scrolling inside the modal doesn't accidentally close it (scroll chaining issue).
Module B: Flow & Kinematic Parity
Verify that motion and physics feel the same.
- The "100ms" Rule: Animation durations must be tweaked per platform to feel "snappy."
- Test: Open/Close a card.
- Check: iOS usually uses spring animations (bounce). Android uses curves (Material motion). The PWA must detect the OS and apply the correct animation curve library (e.g.,
framer-motion or react-spring presets).
- Haptics (Tactile Feedback):
- Test: Toggle a switch.
- Check: Does the PWA trigger the
Navigator.vibrate() API to mimic the native haptic feedback?
Module C: The "Native Web" Gauntlet
Specific tests for PWA limitations to ensure it doesn't break the illusion of an app.
- State Preservation:
- Test: User minimizes app (Home button) -> Opens Camera -> Returns to App.
- Parity Check: Native apps usually hold state. Browsers often reload the tab (crashing the SPA). Fix: Implement PWA
workbox caching to restore state instantly.
- Safe Areas (Notch/Dynamic Island):
- Test: Open on iPhone 14 Pro.
- Parity Check: Ensure content is not obscured by the notch. Web requires
env(safe-area-inset-top) CSS variables that Native handles via constraints.
Phase 4: The "Gesture Audit" Checklist
A specific checklist for the testers to mark as Pass/Fail.
| Gesture / Flow | Native iOS | Native Android | PWA (Mobile) | Parity Policy |
|---|
| Back Navigation | Screen Edge Swipe | System Back Gesture | Browser Back / UI Button | Must support Host OS convention. |
| Refresh | Spinner (Pull) | Spinner (Pull) | Browser Reload / UI Button | PWA should implement Pull-to-Refresh JS library for parity. |
| Context Menu | Long Press (Haptic) | Long Press (Vibrate) | Right Click (Desktop) / Long Press (Mobile) | PWA must map Touch-Hold to Context Menu. |
| Copy/Paste | System Menu | System Menu | OS Menu (Web) | Ensure text is selectable (CSS user-select). |
| Keyboard | Auto-capitalization | Predictive Text | Virtual Keyboard | Check input type="tel" vs type="number" behavior. |
Phase 5: Reporting & Remediation
1. The "Delta" Report
Group issues into two categories:
- Visual Deltas: (e.g., "The shadow on the button is 2px lower on Web"). Severity: Low.
- Functional Deltas: (e.g., "Swipe to delete crashes the Web view" or "Android back button exits the app instead of closing the modal"). Severity: Critical.
2. Shared Logic Repository
To fix deltas, move business logic out of View Controllers/Activities/DOM and into:
- Shared View Models: (e.g., Kotlin Multiplatform or TypeScript interfaces).
- Design Tokens: Export colors, spacing, and typography from Figma directly to JSON, consumed by iOS (SwiftUI), Android (Compose), and CSS/Web.
Success Metric
The lab is considered successful when a beta tester can perform a critical user journey (e.g., "Add to Cart") on an iPhone, switch to a desktop browser, and later open the Android app, without noticing a break in the visual language or interaction flow.