Skip to content

chore: keep each screen's figma frames in the screen file #803

Description

@ovitrif

Problem or use case

iOS has no mapping from a view to its Figma frame. AGENTS.md only says to start from the latest Bitkit - Handoff vNN page, so each PR author and reviewer searches Figma by hand. That breaks down when a spec arrives later on another page: the Payment Request confirmation for #791 was specced on Bitkit - Refactor v63, and a review compared the PR against the superseded Handoff v62 frames. SendConfirmationView.swift also renders several designs (on-chain and Lightning send, subscription and payment request states), and nothing records which frame belongs to which.

Proposed solution

Adopt the same tag format as Android, as /// doc comment lines on each view that renders a whole Figma frame: every navigation destination (the views behind route enums such as SendRoute) and every sheet root.

/// Figma: Send (Paste) (On-chain) › Confirm Send Onchain
/// Figma (payment request): Bitkit - Refactor v63 › Send (Pay Payment Request) › Payment Request
/// Figma (payment request details): Bitkit - Refactor v63 › Send (Pay Payment Request) › Confirm Details
struct SendConfirmationView: View {
  • Figma: <Section> › <Frame> is a frame on the latest Bitkit - Handoff vNN page.
  • Figma: <Page> › <Section> › <Frame> is a frame on another page, for a spec that arrived later.
  • Figma (<state>): … gives the frame for one state when a view renders several designs, one line per state.
  • Figma: todo when the view shipped ahead of its design, Figma: n/a when no design is intended.
  • One live frame per state. When a newer spec lands, its line replaces the old one.

The work, in one PR that changes only this concern:

  1. Tag every navigation destination and sheet root view.
  2. Add the two payment request states to SendConfirmationView.swift.
  3. Add a check (unit test or build-phase script) that fails when a navigation destination or sheet root has no tag, or a tag doesn't match the grammar.
  4. Point AGENTS.md and the PR template at the tags, with git grep -n "Figma:" -- 'Bitkit/Views' for an overview.

Acceptance

  • Every navigation destination and sheet root view carries at least one valid Figma tag.
  • SendConfirmationView.swift names the Refactor v63 Payment Request and Confirm Details frames for its payment request states.
  • The check fails for an untagged navigation destination or sheet root.
  • AGENTS.md and the PR template resolve a view's design through its tags.
  • The PR changes only tags, the check and those instructions, with no UI or behaviour change.

Alternatives considered

  • A central map like Android's docs/screens-map.md: the file every screen PR edits, which is what the Android twin removes.
  • Tagging every View type: most are components inside a frame, so the tags would be noise.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions