feat(example): add the Native List Row Style page - #111
Open
huhuanming wants to merge 1 commit into
Open
huhuanming wants to merge 1 commit into
huhuanming wants to merge 1 commit into
Conversation
The row style now exists on all three platforms but only the Web half has automated coverage, so the native halves need something to check against. This page is that artifact. Every template is rendered twice - plain, then styled - behind a toggle. With the toggle off the whole page must match the build from before the row style existed, which is the regression check that matters most: unstyled rows must not move by a pixel. The rows deliberately cover what the field-to-view mapping is most likely to get wrong. metricCard styles `value` and `title` separately, and the two must land on the large number and the small label respectively even though they share views with identity's title and subtitle. message styles `body` and `time`, which are carried by the subtitle and status views. One identity row grows its text and gives an explicit height, because heights are not derived from the style. Also link STYLE_SPEC.md from DESIGN.md, so the architecture document points at the style vocabulary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
originalix
reviewed
Sep 16, 2026
| * every row is untouched, so the whole page should be pixel-identical to the | ||
| * build before the row style existed - that is the regression check. | ||
| */ | ||
| function buildRows(styled: boolean): RowModel[] { |
Contributor
There was a problem hiding this comment.
P2: [The regression page does not cover every styled row template]
When this page is used as the documented cross-platform regression check, buildRows only creates styled counterparts for identity, metricCard, message, rail, and action. The NativeList model also exposes style surfaces for activity, dataRow, market, mediaTile, sectionHeader, system, and walletGroup, so regressions in those binders are never rendered or exercised by the toggle.
Please add representative plain/styled pairs for the missing templates (including a styled section header) and have the toggle remove each counterpart’s style object, so the page actually covers the promised all-template comparison.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #110 → #109 → #107. This PR's diff is P3 only.
What
The Native List Row Style example page, plus a
DESIGN.md→STYLE_SPEC.mdlink.Why this instead of
listStyleP3 was planned as list chrome (
listStyle) plus an example page. I did the example page and deferred the chrome API, for two reasons:UIRefreshControl,SwipeRefreshLayout); the section index rail is three independent constant sets; the reorder count badge is drawn onCanvasinside Android'sdispatchDraw. A unified API over that would declare knobs that silently do nothing on some platforms — the opposite of what the spec is for.So P3 delivers the thing that actually unblocks verification.
The page is a regression check, not a gallery
Every template renders twice — plain, then styled — behind a toggle. With the toggle off, the page must match the build from before the row style existed. Unstyled rows must not move by a pixel; that is the single most important thing to confirm on device.
The styled rows deliberately target what the field-to-view mapping is most likely to get wrong:
metricCardstyle.valuemust hit the large number andstyle.titlethe small label, even though they share views with identity's title and subtitlemessagestyle.bodyandstyle.timereach the subtitle and status viewsidentity$bodyMd), a raw override,badge,value, plushorizontalPaddingandlineGaprail,action$headingMdand an explicitheight, because heights are not derived from the style (§6.1)Verification
@onekeyfe/react-native-native-listthrough a workspace symlink whosetypespoint at an unbuiltlib/, so every NativeList page in the example already fails withTS2307— pre-existing, 12 files. I verified this page with a throwaway tsconfig mapping the import tosrc/index.ts; 0 errors, and the temp file is not committed.eslinton the new page androute.tsx— clean.tsc --noEmithas 72 pre-existing errors onmain-equivalent code and is not a usable gate.What to check on device
metricCardlarge number grows and turns green while its small label shrinks — if those two swap, the mapping is wrong.🤖 Generated with Claude Code