-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new text size scale, deprecate old sizes and Heading #4113
Add new text size scale, deprecate old sizes and Heading #4113
Conversation
RNBW-4399 Add new type scale, deprecate old values
The existing values will be left in the system so that we don't have to migrate everything at once, but marked as deprecated so that they won't be used in future work. Spec: https://www.figma.com/file/wFXhL8ZcaBnIlWSSQTLWPA/RDS-Core?node-id=12%3A222 |
@@ -81,17 +82,24 @@ export default function RecordTags({ | |||
); | |||
} | |||
|
|||
const tagSizes = selectTextSizes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -1,6 +1,36 @@ | |||
/** | |||
* ⚠️ IMPORTANT NOTE ⚠️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add a link to the Figma spec here so devs can visually reference what is in this file?
I guess they could just open up the docs though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how set in stone the Figma URL is, so I might come back to this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful 💪
…w-4378-clean-up-global-and-env-vars-in-app-move * 'develop' of github.com:rainbow-me/rainbow: (40 commits) fix: quiet logs when linting in CI (#4070) analytics: add tracking for screen dimensions + fix nav events on android (#4088) fix native input cursor color (#4112) Profiles: use `name` text record instead of `me.rainbow.displayName` (#4046) chore: upgrade eslint-config-rainbow (#4118) backup PIN (#4012) Remove long press on address in switching wallets (#3990) Version bump iOS v.1.7.4 & Android 144 (#4117) Fix slow image loading (#4052) Add new text size scale, deprecate old sizes and Heading (#4113) Disable campaings in e2e and fix testID of PromoSheet (#4107) 🏛 chore: prettier everything (#4100) fix settings StatusIcon shadows on android (#4104) fix clear async storage crash (#4105) fix RNBW-4416 (#4103) 🏛 Update to React Query 4 (#4060) swaps: init cross chain feature flag (#4091) enable arbiitrum swap details test (#4092) remove unsafe access to networkInfo (#4096) network check (#4094) ...
…w-4388-configure-jest-for-unit-tests * 'develop' of github.com:rainbow-me/rainbow: Profiles: Support contenthash (#4067) 🏛 GraphQL Clients/Codegen Foundations (#4086) fix: quiet logs when linting in CI (#4070) analytics: add tracking for screen dimensions + fix nav events on android (#4088) fix native input cursor color (#4112) Profiles: use `name` text record instead of `me.rainbow.displayName` (#4046) chore: upgrade eslint-config-rainbow (#4118) backup PIN (#4012) Remove long press on address in switching wallets (#3990) Version bump iOS v.1.7.4 & Android 144 (#4117) Fix slow image loading (#4052) Add new text size scale, deprecate old sizes and Heading (#4113)
Fixes RNBW-4399
Figma link: https://www.figma.com/file/wFXhL8ZcaBnIlWSSQTLWPA/RDS-Core?node-id=12%3A222
What changed (plus any additional context for devs)
New standard text sizes are now available on the design system
Text
component to align with new standards from Figma. Note that line height variants form part of thesize
scale.11pt
12pt
13pt
,13pt / 135%
,13pt / 150%
15pt
,15pt / 135%
,15pt / 150%
17pt
,17pt / 135%
,17pt / 150%
20pt
,20pt / 135%
,20pt / 150%
22pt
26pt
30pt
34pt
44pt
All new heading sizes are now provided via
Text
. TheHeading
component is now marked as deprecated and will be removed in a future PR.Default
size
values forText
(16px
) andHeading
(20px
) have been removed since the previous defaults have been deprecated.To make future migration work easier, the default
weight
value forHeading
has been removed, forcing all usages to inline the default value of"heavy"
.Heading/Text size migration guide
All existing sizes have been renamed to make it very clear that they shouldn't be used going forwards while maintaining support for existing usages. To align with the new naming convention, the old sizes also include their line height values.
Heading migration guide
Note that
weight
no longer has a default value. If no weight was defined, it should be "heavy".<Heading>
-><Heading size="20px / 22px (Deprecated)" weight="heavy">
<Heading size="18px">
-><Heading size="18px / 21px (Deprecated)" weight="heavy">
<Heading size="20px">
-><Heading size="20px / 22px (Deprecated)" weight="heavy">
<Heading size="23px">
-><Heading size="23px / 27px (Deprecated)" weight="heavy">
<Heading size="26px">
-><Heading size="26px / 30px (Deprecated)" weight="heavy">
<Heading size="28px">
-><Heading size="28px / 33px (Deprecated)" weight="heavy">
<Heading size="30px">
-><Heading size="30px / 34px (Deprecated)" weight="heavy">
<Heading size="34px">
-><Heading size="34px / 41px (Deprecated)" weight="heavy">
<Heading size="44px">
-><Heading size="44px / 53px (Deprecated)" weight="heavy">
Text migration guide
<Text>
-><Text size="16px / 22px (Deprecated)">
<Text size="11px">
-><Text size="11px / 13px (Deprecated)">
<Text size="12px">
-><Text size="12px / 14px (Deprecated)">
<Text size="14px">
-><Text size="14px / 19px (Deprecated)">
<Text size="15px">
-><Text size="15px / 21px (Deprecated)">
<Text size="16px">
-><Text size="16px / 22px (Deprecated)">
<Text size="18px">
-><Text size="18px / 27px (Deprecated)">
<Text size="20px">
-><Text size="20px / 24px (Deprecated)">
<Text size="23px">
-><Text size="23px / 27px (Deprecated)">
What to test
Check that text is still rendering correctly in the app. TypeScript is doing most of the heavy lifting here, but any changes to JS files require a bit of extra scrutiny. The list of deprecated text sizes above is helpful when checking the diff, but I've also added some additional code to throw an error in dev mode when the requested text size is missing so it should get picked up in e2e tests.
Final checklist
team1/team2
,critical path
,release
,dev QA
)dev QA
label, did you add the PR to the QA Queue?