feat(ios): style SwiftUI controls instead of wrapping CDS views - #893
Merged
Merged
Conversation
Keep Button, Toggle, Text, and ProgressView as SwiftUI primitives and ship CDS ButtonStyle, ToggleStyle, cdsText, and ProgressViewStyle. Alert stays a system .alert with no CDS view. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
✅ Heimdall Review Status
✅
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
✅
1/1
|
Denominator calculation
|
- Add .claude/skills/swiftui-best-practices (SKILL.md, best-practices and RN->iOS HIG map references, evals) - Root AGENTS.md: load swiftui-best-practices for SwiftUI / RN->iOS migration work - cds-ios AGENTS.md: link CDS SwiftUI Best Practices doc; RN is the visual spec, not HIG; whole-app CDS via environment inheritance, not wrapper views - Alert/ToggleStyle docs and gallery copy: OS .alert is contrast only; CDS Alert will be a CDS view matching the RN modal Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… copy Co-authored-by: Cursor <cursoragent@cursor.com>
…s doc Co-authored-by: Cursor <cursoragent@cursor.com>
cb-ekuersch
approved these changes
Sep 28, 2026
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.
What changed? Why?
iOS should not re-implement system controls as CDS views. This PR reshapes the experimental (internal) iOS components so SwiftUI owns the primitive and CDS owns the look, and adds agent guidance so future migrations follow the same pattern.
SwiftUI Style / modifier instead of CDS wrapper views
Button+.buttonStyle(.cds)andCDSButtonLabelfor icon spacingToggle+.toggleStyle(.cds)Text+.cdsTextProgressView+.progressViewStyle(.cds)SlideButtonstays a CDS view — there is no SwiftUI primitive to restyle. The gallery demos each pattern as its own section. Components remaininternal.swiftui-best-practicesskill + AGENTS guidance.claude/skills/swiftui-best-practicesskill (rewrite patterns, "why not a wrapper", RN → iOS map); rootAGENTS.mdloads it for SwiftUI / RN → iOS work.packages/cds-ios/AGENTS.mdlinks the CDS SwiftUI Best Practices doc and adds:.alertshown in the gallery is for contrast only; the CDS Alert will be a CDS view matching the RN modal (doc comments and gallery copy updated accordingly).CDSThemeProvidersets environment defaults so plain SwiftUI controls pick up CDS styling.UI changes
Gallery-only. No product screenshot matrix; exercise on iOS Simulator via
yarn nx run ios-gallery:launch.Testing
How has it been tested?
Testing instructions
yarn nx run cds-ios:testyarn nx run ios-gallery:launchChange management
type=routine
risk=low
impact=sev5
automerge=false
Made with Cursor