-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update design tokens #378
Update design tokens #378
Conversation
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
@@ -21,7 +23,8 @@ fun Titles() { | |||
.padding(16.dp) | |||
) { | |||
DefaultTitles() | |||
TitleStyle.values().forEach { | |||
TitleStyle.entries.forEach { | |||
Spacer(modifier = Modifier.height(24.dp)) |
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.
Just to make Title catalog easier to check for each Title type.
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.
We could also make TitlesWithStyleOverriden accept a modifier by parameter and set padding there.
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.
Yes, but the Composable TitlesWithStyleOverridden does not have a root composable component like Row, Column or Box, so I could not apply this parameterized modifier. I added a Spacer instead to make it as simple as possible with minimal code.
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.
Improve id's naming and add new Titles
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.
Apart from the change in titles, the names of the buttons that ended in "Selected" have also been changed to "Pressed"
presetTitle1FontWeight = brand.title1FontWeight, | ||
presetTitle2FontWeight = brand.title2FontWeight, | ||
presetTitle3FontWeight = brand.title3FontWeight, | ||
presetTitle3FontSize = brand.title3FontSize, |
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.
- Title1 -> Remains the same as before
- Title2 -> based on Preset3 with custom
font-weight
for each brand - Title3 -> based on Preset5 (as it was configured in the old Title2) with custom
font-weight
andtext-size
for each brand - Title4 -> based on Preset6 without any customization, so that's why I didn't add a specific preset for Title4.
ℹ️ You will see the same configuration in the XML-side.
More info here: https://www.figma.com/design/yQRVCOmRQNM98bnXndLPxK/%F0%9F%94%B8-Title-Specs?node-id=504-624&t=wuNyXP4uuHApFHcf-4
get() = super.values.copy(titleStyle = TitleStyle.TITLE_2) | ||
get() = super.values.copy(titleStyle = TitleStyle.TITLE_3) |
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.
Before all these changes, Movistar was the only Brand with Title2 style by default (the other brands had and will continue to have the Title1 style by default).
With the new Title changes, all the Title2 references should be replaced by the new Title3 style, so that's why I've changed this value here.
ℹ️ You will see the same configuration in the XML-side.
More info here: Telefonica/mistica-design#1796 (comment)
🍏 iOS alignment: Telefonica/mistica-ios#397 (comment)
textSize: TextUnit = 20.sp, | ||
) = buildPreset5().copy( | ||
fontWeight = fontWeight, | ||
fontSize = textSize, | ||
) |
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.
Remember: I am not building a PresetTitle4 since this title is using Preset6 without any customization.
Usage: https://github.com/Telefonica/mistica-android/pull/378/files#diff-92dbc5d50904a858fa74ff3a03ba997ab7a1c8ac4a8ebc43927c64b633b46810R99
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.
Ignore these changes, they will be omitted from here when this PR is merged: https://github.com/Telefonica/mistica-android/pull/377/files#diff-9c529f263e896a6b37a86737ff58630be9011d084698c66a706a66cffdbda783R76-R85
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.
LGTM
@@ -21,7 +23,8 @@ fun Titles() { | |||
.padding(16.dp) | |||
) { | |||
DefaultTitles() | |||
TitleStyle.values().forEach { | |||
TitleStyle.entries.forEach { | |||
Spacer(modifier = Modifier.height(24.dp)) |
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.
We could also make TitlesWithStyleOverriden accept a modifier by parameter and set padding there.
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.
Good job!
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.
Please, tag it with "Breaking change" and remember to write breaking changes on release notes when published.
Check also we are pointing to same mistica design tag than iOS.
I would also add a ticket to the task, so we have it tracked changes in jira.
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.
🤩
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.
✏️
This PR was automatically created by the import-design-tokens GitHub Action.
🎟️ Jira ticket
ANDROID-15048
🥅 What's the goal?
Update new Mistica tokens and give support for mistica-android.
🚧 How do we do it?
☑️ Checks
🧪 How can I test this?