fix(components): align token names with the other SDKs and drop the title weight to 500 (ORC-8443) - #435
Draft
OnurVar wants to merge 1 commit into
Draft
fix(components): align token names with the other SDKs and drop the title weight to 500 (ORC-8443)#435OnurVar wants to merge 1 commit into
OnurVar wants to merge 1 commit into
Conversation
…itle weight to 500 (ORC-8443)
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.
ORC-8443
iOS, Android and web agree exactly on token names and values. React Native drifted after ORC-8229. Four fixes, all in the theme.
titleXLargebecomestitleXlarge. The other three use a lowercase l. A theme copied from the iOS or web docs set a key that did not exist here and was silently dropped.radii.baseandspacing.baseadded at 4. The other three have a base step for both. React Native only had one for sizes.The existing entries are not renamed into base.
radii.noneis 0 andspacing.xxxlargeis 32, so calling either one base would ship a token holding the wrong number.radii.noneis deleted, nothing read it.spacing.xxxlargehad one reader, the status screen's horizontal padding, and it now readssizes.xlarge, which is 32 and what the token's own comment said it was. That is the first readersizes.xlargehas.Title weight goes from 600 to 500. The design value is 550 and the other three render it. React Native cannot: its parsers reject the value outright, and the one that runs on the New Architecture logs an unsupported weight and renders 400. So 550 here would come out lighter than the 600 we ship today. 500 is the closest it can reach, and it is one step closer to the design than 600 was.
Titles will render one step lighter than the same screen on iOS. Visible side by side, not in isolation.
The weight field is typed. It was a plain
string. It is now a union of the nine weights React Native actually renders, so a 550 can never compile in again. Existing casts are left alone, cleaning them up would widen this into files other PRs in the batch are editing.Safe to rename now, this is still beta with no external consumers.
Tests
Typecheck clean, eslint clean, 426 of 427 jest. The one failure is the known Turkish-locale localization test.
Notes
Part of a parity batch across the four SDKs. This one is React Native only, the other three already agree.