Skip to content

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

Merged
ntucker merged 15 commits into
mainfrom
native/visual-forms
Aug 22, 2026
Merged

Expand silk-native with visual primitives and forms#16
ntucker merged 15 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: e848f12

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
…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
Comment thread packages/silk-native/src/components/Progress.tsx Outdated
…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.

Comment thread packages/silk-native/src/components/Heading.tsx
ntucker and others added 4 commits August 22, 2026 14:02
Set iOS accessibilityLevel from the recipe level alongside RNW aria-level.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve cross-platform accessibility and first-frame behavior while adding scalable mapper and budget drift guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
…d mapper output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@ntucker
ntucker merged commit c3b0184 into main Aug 22, 2026
3 checks passed
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