Skip to content

refactor(native): align iOS theme object shape with Android - #878

Open
adrienzheng-cb wants to merge 1 commit into
masterfrom
adrien/native-theme-parity
Open

refactor(native): align iOS theme object shape with Android#878
adrienzheng-cb wants to merge 1 commit into
masterfrom
adrien/native-theme-parity

Conversation

@adrienzheng-cb

Copy link
Copy Markdown
Contributor

What changed? Why?

Native iOS and Android theme objects carried the same tokens under different names, which would make a shared token contract and any future codegen harder. iOS now uses the Android/JS key names; Android gains the illustration and shadow token enums iOS already had.

iOS (breaking, still 0.0.x):

  • spacingspace, radiusborderRadius, shadowshadows
  • light / darklightColors / darkColors
  • rungs r400radius400, w100borderWidth100
  • shadow fields radius / x / yblurRadius / offsetX / offsetY

Android:

  • CdsIllustrationColorToken and CdsShadowToken so every axis is enumerable on both platforms

Left as platform-shaped on purpose: iOS offsetX and currentColor (no Compose analog), and typography still a dictionary on iOS vs named TextStyles on Android.

UI changes

No visual change. Token values are unchanged; only accessor names moved.

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

  • yarn nx run cds-ios:test
  • yarn nx run cds-android:test

Change management

type=routine
risk=low
impact=sev5

automerge=false

Made with Cursor

iOS used Swift-er names (spacing, radius, light/dark) while Android matched
the JS theme keys. Rename iOS accessors and rungs to the shared native
shape, and add the missing Android illustration/shadow token enums.

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

cb-heimdall commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS ✅ See below

CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 1/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

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

Development

Successfully merging this pull request may close these issues.

3 participants