Repository navigation
spec(Card): React Native platform record - #12865
imdreamrunner wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and the record needs the fixes below either way. The record adds React Native requirements that no current spec states (FR1–FR7, AR1–AR2, DEC-1 and DEC-2), so an engineering owner records the decision by commenting /approve-spec with the full head SHA, and the author may do so as an engineering owner. That decision should settle DEC-2 and OQ1: whether body and surface join core's variant for every platform or are dropped.
- DEC-2 adds
bodyandsurfaceto React Native'svariantonly, whichspec:AST-082DEC-2 andspec:AST-093FR4 rule out (no visual option for one platform), so drop them here and pursue OQ1's first option as acomponent:Cardchange or a theme-added variant styled through the native theme. - FR3, FR7, ORD2, AV1 and the theme-values list rely on the theme's card padding and Card overrides, which
spec:AST-082FR18 gives no native meaning, so name the native source (each platform entry'scomponentsoverride, FR10) or state that an omittedpaddingtakes spacing step 4. - FR4 makes the card fill a
Carouselitem's height while the record's non-goals leave a card's size in a row to the stack around it and no cited claim covers it, so drop the sentence or give it a basis and fix the non-goal. - DEC-1 lists percentages among the sizes React Native does not read, but React Native layout reads numbers and percentages for these props, so name only the strings it cannot read (
rem,vh,calc()). - The FR6, AR1, AR2 verification row has no text-size check or failure expectation for AR2, which
spec:AST-093FR5 requires at the largest Dynamic Type size. - The description's R3 rubric result says every basis cell names claims, but FR1 and FR5 cite
component:Cardwithout a claim and FR4's claims do not cover its Carousel sentence.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the record is stacked on the change that lets the knowledge tooling accept React Native records, and merges after it — verified: the base branch is that pull request's head, and it is an open draft.
- Claim: the record cites only records on the main branch — verified: every cited record exists there.
- Claim: the cited Card, ClickableCard, SelectableCard, container padding, theming surface and native system records are current — verified.
- Claim: open React Native records exist for Button, CheckboxInput and TabList, and none covers Card — verified: three open drafts on the same base, and no other open Card record found.
- Claim: the Decision bullets describe the record — verified against FR1–FR6, DEC-1, DEC-2 and OQ1.
- Claim: no rejected alternatives are recorded — verified.
- Claim: the record covers only what React Native adds or does differently — partly: FR2, FR3 and FR7 restate core's rules.
- Claim: one gap line states where the implementation differs — present, but not checkable here because the implementation is outside this repository.
- Claim: rubric results R1, R2 and R4–R7 — verified; R3 is false (see above).
- Claim: the pull request holds specification records only, with no internal context — verified.
- Claim: the knowledge check, formatter and whitespace checks pass — verified: rerun at this head, all pass.
- File: the new React Native Card record — the findings above.
…zing reason; text-size check
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and three record fixes are needed either way. The record adds React Native requirements that no current spec states (FR1, FR3–FR5, FR7, ORD1–ORD2, PR1, AV1, AR2 and DEC-1), so an engineering owner records the decision by commenting /approve-spec with the full head SHA, and the author may do so as an engineering owner. The React Native-only body and surface values are gone, and the padding source, sizing reason and text-size check are fixed.
- ORD1 puts an explicit
paddingbefore a platform entry's Card override while ORD2 and FR7 apply that override over the card's own styles, so state in ORD2 and FR7 that padding follows ORD1. - Miss: the record follows
spec:AST-093and runs on iOS but names no Apple Human Interface Guidelines pages, whichspec:AST-093FR3 requires, so add a guideline-pages line beside the platform-control paragraph. - The description's R3 line says every basis cell names claims, but FR2's basis cites
architecture:component-theming-surfacewithout one, so name the claim or drop that sentence.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record is stacked on the change that lets the knowledge tooling accept React Native records, and merges after it — verified: the base branch is that change's head, and it is still open.
- Claim: the record cites only records on the main branch — verified: every cited record exists there and is current.
- Claim: the cited system-spec claims cover which props a platform offers, portable forms, base props, native theme overrides, single-platform visuals, platform controls, theme values and checks — verified against their text.
- Claim: open React Native records exist for Button, CheckboxInput and TabList, and none covers Card — verified.
- Claim: the Decision bullets describe the record — verified against FR1–FR6 and DEC-1.
- Claim: no rejected alternatives are recorded — verified.
- Claim: the record covers only what React Native adds or does differently — partly: FR2, FR3 and FR7 restate core's rules.
- Claim: one gap line states that the package also takes
bodyandsurface— present; not checkable here because the package is outside this repository. - Claim: rubric results R1–R7 — verified; the R3 line's remark that every basis cell names claims is false (see above).
- Claim: the pull request holds specification records only, with no internal context — verified.
- Claim: the knowledge check, formatter and whitespace checks pass — verified: rerun at this head, all pass.
- File: the React Native Card record — the three findings above.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and one record fix is needed either way. The record adds React Native requirements that no current spec states (FR1, FR3–FR5, FR7, ORD1–ORD2, PR1, AV1, AR2 and DEC-1), so an engineering owner records the decision by commenting /approve-spec with the full head SHA on this pull request, and the author may do so as an engineering owner. The padding precedence, the guideline pages and FR2's basis from the last round are fixed, and the record validates only once the knowledge-tooling change it is stacked on lands.
- Miss: DEC-1 and FR1 move Card's
width,height,maxWidthandminHeightout of the shared contract although React Native draws numeric sizes, whilespec:AST-082FR3 keeps a platform from removing a core prop and FR4 and DEC-12 keep a wider web type's portable values in the core, so keep a numeric form with CSS strings web-only or state in DEC-1 why none fits, make the core and web split acomponent:Cardchange, and correct the readiness cell that says the core and web contracts are unchanged.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record is stacked on the change that lets the knowledge tooling accept React Native records, and merges after it — verified: the base branch is that change's head, still open as a draft.
- Claim: the record cites only records on the main branch — verified: each cited record exists there and is current.
- Claim: the authority searched (core Card, the acting cards, container padding, the theming surface, and the cited native-surface and native-guideline claims) is current and says what the description says — verified; the search leaves out the native-surface decision on projecting wider web types, which bears on the sizing decision.
- Claim: open React Native records exist for Button, CheckboxInput and TabList, and none covers Card — verified by repository search.
- Claim: the Decision bullets describe the record — verified against FR1–FR6 and DEC-1; the sizing bullet's reasoning is the finding above.
- Claim: no rejected alternatives are recorded — verified.
- Claim: the record covers only what React Native adds or does differently, and ownership collisions are called out — false for DEC-1, which also sets Card's shared contract (the finding above); FR2, FR3 and FR7 restate core's rules.
- Claim: one gap line says the package also takes
bodyandsurface— present; not checkable here, because the package is outside this repository. - Claim: rubric results R1–R7 — verified; every basis cell now names a claim or a decision.
- Claim: the pull request holds specification records only, with no internal context — verified.
- Claim: the knowledge check, formatter and whitespace checks pass — verified: rerun at this head, all pass.
- File: the React Native Card record — the finding above, plus non-blocking notes on the padding verification state and the text-size growth wording.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and two record fixes are needed either way.
The record adds React Native requirements that no current spec states: FR1 and DEC-1 (the sizing props in number form only, with CSS length strings web-only, which also needs a component:Card change), FR3 and ORD1, FR4, FR5 and AR2, FR7 and ORD2, AV1, PR1 and the verification map. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
- FR4 (line 106) and its verification row (line 187) make a fixed-height card clip and never scroll, but
component:CardFR4 says aheightother thanautomakes the card scroll, so let a numberheightscroll overflowing content on React Native or make that change incomponent:Cardfor every platform. - FR4's "a caller minimum wins over
width" has no React Native input (core's caller minimum is aminWidthpassed throughxstyle), and the test state "minHeightwith a smallerwidth" (line 187) cannot show it, so drop the clause or restate it asminHeightwinning over a smallerheight.
Non-blocking: PR1 (lines 139–141) lists the variant, elevation, padding and theme as frame inputs but not the number sizes this head adds; every earlier finding is fixed.
Claims and files checked
Review mode: full; reason: spec-record
- The knowledge check passes with the base branch's tooling: verified, with no finding for this record.
- Prettier and the whitespace check are clean: verified.
- The pull request holds only a specification record: verified.
- Two gap lines state where the package differs: present; the package is outside this repository, so their accuracy was not checked.
- React Native takes the core children, padding, variant and elevation and no extra variant, with base props on the container: verified.
- The sizing props keep their number form, CSS length strings stay web-only, and recording that split belongs to the core Card record: verified.
- Padding resolves from the platform override or step 4, the card has no minimum width, grows, clips and never scrolls, and bare words render as body text: verified as stated; the never-scroll rule is the first blocking finding.
- The card is not an accessibility element: verified.
- The record cites only records already on main: verified.
- No other open pull request covers a React Native Card record: verified.
- The writing rubric results: verified.
docs/specs/components/Card/Card.react-native.spec.md: two blocking findings in FR4 and its verification row, one non-blocking note on PR1.
…inHeight over height
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record; the earlier record fixes are done.
The record adds React Native requirements that no current spec states: FR1 and DEC-1 (the sizing props in number form only, with CSS length strings web-only, which also needs a component:Card change), FR3 and ORD1, FR4, FR5 and AR2, FR7 and ORD2, AV1, PR1 and the verification map. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Non-blocking: FR4 (line 106) now says only that content wider than the card clips, so it no longer says what happens to taller content when the layout, not a number height, leaves the card short, and AR2 (line 148) still says the card grows with its content, which a number height overrides.
Claims and files checked
Review mode: full; reason: spec-record
- The knowledge check passes with the base branch's tooling, with no finding for this record: verified.
- Prettier and the whitespace check are clean: verified.
- The pull request holds only a specification record: verified.
- Two gap lines state where the package differs: present; the package is outside this repository, so their accuracy was not checked.
- React Native takes the core children, padding, variant and elevation and no extra variant, with base props on the container: verified.
- The sizing props keep their number form, CSS length strings stay web-only, and recording that split belongs to the core Card record: verified as the record's text; its approval is the owner decision above.
- Padding resolves from the platform override or step 4, and an explicit padding wins: verified.
- The card has no minimum width, grows where the layout leaves room, clips wider content, and scrolls content taller than a number height as core's height does: verified.
- Bare words render as body text, and the card is not an accessibility element: verified.
- The record cites only records already on main, and no other open pull request covers a React Native Card record: verified.
- The writing rubric results: verified.
docs/specs/components/Card/Card.react-native.spec.md: no blocking finding; one non-blocking note on FR4 and AR2.
| | FR1 | React Native's `Card` MUST take core's `children`, `padding`, `variant` and `elevation`, and `width`, `height`, `maxWidth` and `minHeight` in their number form, with core's names, meaning and defaults. `children` takes React content, as a platform contract whose implementation runs React may (`spec:AST-082` FR4). A size is a number of points on iOS and dp on Android, and applies as given, as core's number values do in pixels. Base props are `id` and `isHidden` (`spec:AST-082` FR7) on the card's container, the part core's target sits on. It MUST NOT offer the sizing props' CSS length strings (DEC-1). | `component:Card` FR2–FR5; `spec:AST-082` FR3, FR4, FR7, DEC-12; DEC-1 | verify | | ||
| | FR2 | `variant` MUST paint as `component:Card` FR2 states: `default` the card background with the theme's border, `transparent` nothing, `muted` the muted background, and each palette value its own background tint, with the corners of the theme's container radius. A theme's own variant name paints the base surface, never another variant. React Native offers no variant core does not have (`spec:AST-082` DEC-2). | `component:Card` FR2; `spec:AST-082` DEC-2; `architecture:component-theming-surface` INV14 | verify | | ||
| | FR3 | `padding` MUST resolve and publish as `component:Card` FR3 states: an omitted `padding` takes spacing step 4, or the padding a platform entry's `components` override for Card sets (`spec:AST-082` FR10); a step applies to every edge; a bordered card reduces each edge by the theme's border width, never below zero; and the card publishes its inset to what it holds, so a `Layout` or a full-bleed `Divider` inside it meets its edges (`architecture:container-padding` INV11). | `component:Card` FR3; `spec:AST-082` FR10; `architecture:container-padding` INV11 | verify | | ||
| | FR4 | The card MUST have no minimum width, so it shrinks in a row instead of holding the row at its content's width. A number `width`, `height`, `maxWidth` or `minHeight` applies as given, and `minHeight` wins over a smaller `height`; without a size, the layout around the card sizes it: a `Stack`, a `StackItem` or the parent view. Where that layout leaves room, the card grows with its content, so grown text stays whole, and it clips content wider than it is. A number `height` other than the content's own makes the card scroll its content vertically when the content is taller, as core's `height` does (`component:Card` FR4); without a `height` it never scrolls. | `component:Card` FR4; DEC-1 | verify | |
There was a problem hiding this comment.
Non-blocking: this row now clips only content wider than the card. Where the layout around the card (a Stack, a StackItem or the parent view), not a number height, leaves it shorter than its content, the record no longer says whether that content clips or spills; component:Card FR4 clips overflow. Say the card clips what the layout leaves no room for on either axis, and in AR2 (line 148) that it grows with its content or scrolls it at a number height.
Stacked on #12592; merges after it.
Merge order: none beyond #12592. The record cites only records on main.
Exact decision needed
How React Native renders core's Card: which of core's props it offers and in which form (the sizing props in their number form), and how a React Native card holds its content and reads to screen readers.
Existing authority searched
component:Card(docs/specs/components/Card/Card.spec.md, current): the variants, padding resolution, published inset, elevation and accessibility this record keeps; no React Native rendering.component:ClickableCardandcomponent:SelectableCard(current): the cards that act, which draw the same surface.architecture:container-paddingandarchitecture:component-theming-surface(current): the inset a card publishes and theme overrides.spec:AST-082FR3, FR4, FR7, FR10, DEC-2, DEC-12 andspec:AST-093FR2, FR4, FR5 (current): which props a platform offers, portable forms and projecting a wider web type, base props, native theme overrides, no visual prop for one platform, the platform-control rule, theme values and checks.Decision
docs/specs/components/Card/Card.react-native.spec.md(component:react-native/Card,platform_of: component:Card):children,padding,variantandelevationwith core's meaning, and offers no variant core does not have (spec:AST-082DEC-2); base props sit on the card's container (FR1, FR2).width,height,maxWidthandminHeightkeep their number form on React Native (points or dp), and their CSS length strings (rem,vh,calc()) stay in the web contract, asspec:AST-082FR4 and DEC-12 keep a wider web type's portable values in the core; recording that core/web split is acomponent:Cardchange (FR1, FR4, DEC-1).paddingtaking step 4 or a platform entry'scomponentsoverride for Card, an explicitpaddingwinning (FR3); the card has no minimum width, grows with its content where the layout leaves room, clips content wider than it is, and scrolls content taller than a numberheight, as core'sheightdoes (FR4); bare words render as body text (FR5).Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:Cardor does differently. Cards that act, page regions and a card's size in a row stay with their owners. Whether the page and surface backgrounds become corevariantvalues is acomponent:Cardquestion, outside this record.Evidence and implementation relationship
The record is a specification only and has no implementation in this pull request. Two gap lines state where the package differs: it does not offer the sizing props, and it also takes the
variantvaluesbodyandsurface.Writing rubric results
Rejected:lines.FRn gaplines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: Card (React Native)
Validation
node scripts/check-knowledge.mjs(with this branch's knowledge-path tooling): knowledge templates and records are aligned; no finding in this record.--checkclean on the record.git diff --check: clean.