-
Notifications
You must be signed in to change notification settings - Fork 5
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
IOS-10444 Mistica tokens generator #387
Conversation
80b37cb
to
7e32160
Compare
520623d
to
652c704
Compare
This reverts commit 5d236ea.
@@ -17,15 +12,16 @@ jobs: | |||
uses: actions/checkout@v3 | |||
|
|||
- name: Generate Skin | |||
run: make skin ref=${{github.event.inputs.ref}} | |||
run: make skin |
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.
still pending, I want to modify this to have:
- one action to generate tokens in a linux machine (we don't need a macslave here)
- one action to execute tests when something changes in /scripts/mistica-tokens-generator
|
||
import UIKit | ||
|
||
public extension BrandStyle { |
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.
moved to a different file since it shouldn't be auto-generated
@atabel could you give me feedback about js stuff please? :) |
@@ -113,7 +113,7 @@ In order to automatise this, we can execute this [GitHub action](.github/.workfl | |||
You can also execute it manually using the actions defined in the [Makefile](Makefile). | |||
Example: | |||
```bash | |||
make skin ref=production | |||
make skin |
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.
it will always get the production
branch.
I've added doc to change this but I think it was not useful in the past...
import { reduceColors } from "../reduce-colors"; | ||
import { generateBrandColors } from "../brand-colors-generator"; | ||
|
||
describe("generateBrandColors", () => { |
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.
each test file is in charge of one generator.
I pass a real input and compare with an expected content
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.
Awesome work! Master in JS!
scripts/mistica-skin-generator/generators/colors/__tests__/brand-colors-generator.test.js
Outdated
Show resolved
Hide resolved
scripts/mistica-skin-generator/generators/colors/reduce-colors.js
Outdated
Show resolved
Hide resolved
scripts/mistica-skin-generator/generators/colors/reduce-colors.js
Outdated
Show resolved
Hide resolved
scripts/mistica-skin-generator/generators/colors/reduce-colors.js
Outdated
Show resolved
Hide resolved
scripts/mistica-skin-generator/generators/colors/reduce-colors.js
Outdated
Show resolved
Hide resolved
scripts/mistica-skin-generator/generators/colors/__tests__/brand-colors-generator.test.js
Outdated
Show resolved
Hide resolved
* Tests action for the tool * Create a new workflow for mistica-skin-generator-tests and modify the generation flow to generate tokens * Test show URL * Clean up
π This PR is included in version 31.4.1 π The release is available on GitHub release Your semantic-release bot π¦π |
ποΈ Jira ticket
https://jira.tid.es/browse/IOS-10444
π₯ What's the goal?
Fix the mistica tokens generator which is broken due to the gradient colors.
π§ How do we do it?
I've created a sub-folder in the project and develop a new tool in js to get the files and add the logic to resolve the Mistica colors problem. The previous tool was very simple and I need to add logic to decide if a color is gradient, solid,... depending on the rest of the brands.
I've added doc to this folder
I've added tests to this tool. I will execute it from GH actions.
I will automatise it from GH actions since it can be executed in a linux runner (IOS-10444 Mistica importer from GH ActionsΒ #390).
π§ͺ How can I verify this?
Part I
I've generated & pushed the new generated files. The tests passed.
I've restored because I don't want to add noise to this PR.
Part II
make skin