Skip to content

Expand silk-native with visual primitives and forms - #16

Open
ntucker wants to merge 11 commits into
mainfrom
native/visual-forms
Open

Expand silk-native with visual primitives and forms#16
ntucker wants to merge 11 commits into
mainfrom
native/visual-forms

Conversation

@ntucker

@ntucker ntucker commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extends @reactive/silk-native with visual primitives (Surface, Card, Heading, Badge, Separator, Avatar, StatusDot, Skeleton, Spinner, Progress) and forms (Input, Textarea, Field, Checkbox, Switch, RadioGroup) on the same silk-core recipes as web.
  • Adds shared native infra: density-aware control geometry, elevation/shadow mappers, useReducedMotion, RNW a11y compat helpers, and Field wiring that mirrors the web contract.
  • Defers native Slider (documented) so the array-valued multi-thumb contract is not forked; updates docs (NativeSettingsForm fixture + stories), example app, perf budgets, and packed-consumer check.

Test plan

  • yarn workspace @reactive/silk-native test (59)
  • yarn workspace @reactive/silk-docs test (376)
  • node scripts/perf-budgets.mjs
  • node scripts/packed-consumer-check.mjs
  • yarn workspace @reactive/silk-native-example test
  • Manual iOS/Android checklist in apps/native-example/README.md (shadows, spinner, switch, TalkBack/VoiceOver, RTL)

Made with Cursor

Ship Surface through Progress plus Input/Textarea/Field/Checkbox/Switch/RadioGroup on the same silk-core recipes as web, with RNW a11y compat, fixtures, and gates. Slider stays deferred to avoid forking the shared array-valued contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 013eedd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@reactive/silk-native Minor
@reactive/silk-docs Patch
@reactive/silk-native-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/silk-native/src/styles/mapStyles.ts Outdated
Comment thread packages/silk-native/src/components/RadioGroup.tsx Outdated
Comment thread packages/silk-native/src/styles/useReducedMotion.ts
…n first paint.

Keep RadioGroup item spacing in the style mapper, leave disabled Switch thumbs on surface, and seed reduce-motion from matchMedia so motion never flashes before the OS preference resolves.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/components/Progress.tsx Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread apps/docs/src/fixtures/NativeSettingsForm.tsx
Comment thread packages/silk-native/src/styles/useReducedMotion.ts
…ce-motion probe failures.

Storybook's state control now reseeds checkbox/field defaults without a remount race, and AccessibilityInfo errors fall back to allowing motion instead of sticking on the optimistic reduced-motion default.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/components/Checkbox.tsx
Apply fixed size to an inner View and row layout on Pressable, matching RadioGroup.Item so labels are not clipped by the checkbox dimensions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/components/Field.tsx
ntucker and others added 2 commits July 26, 2026 21:28
Custom Label/Description/Error nativeIDs were ignored, so group controls could point accessibilityLabelledBy at the generated id instead of the slot view.

Co-authored-by: Cursor <cursoragent@cursor.com>
The children-beside-box fix pushed isolated Checkbox to 2919 B; give modest headroom so CI tracks real regressions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/components/Switch.tsx
Comment thread packages/silk-native/src/components/Field.tsx Outdated
…eselect.

Keep descriptions/errors under the label in horizontal fields, derive Switch thumb travel from measured track width, and match web by not re-emitting RadioGroup changes for the active item.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/styles/useReducedMotion.ts Outdated
ntucker and others added 2 commits July 27, 2026 09:51
…lves.

On RNW, keep prefers-reduced-motion as the source of truth so Storybook and tests do not re-enable motion when AccessibilityInfo disagrees.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the legacy MediaQueryList listener path and assert AccessibilityInfo is skipped when matchMedia is available.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/styles/useReducedMotion.ts Outdated
},
]}
/>
) : null}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress bar empty until layout

Low Severity

Determinate Progress only mounts the fill indicator when trackWidth > 0, and width comes solely from onLayout. Until layout runs, users see an empty track even when value is set (e.g. 72%), so completeness feedback is missing on the first frame(s).

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a6f4e1a. Configure here.

…ce until Reduce Motion is confirmed.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 013eedd. Configure here.

style={[mapped, style]}
>
{children}
</RNText>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native heading level not exposed

Medium Severity

Native Heading sets accessibilityRole="header" and an RNW-only aria-level, but never sets iOS accessibilityLevel from the level recipe prop. VoiceOver on device therefore cannot reflect the intended heading hierarchy (e.g. level 2 vs 3), unlike web’s semantic h1h6 tags.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 013eedd. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant