-
Notifications
You must be signed in to change notification settings - Fork 3
README.md #22
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
Closed
Closed
README.md #22
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
400da69
Update README.md
emanuelcaaju 10106a2
Update README.md
emanuelcaaju cab0d74
Update README.md
emanuelcaaju 9378019
Update README.md
emanuelcaaju 9ac2fc9
Update README.md
emanuelcaaju 3ec8689
Update README.md
emanuelcaaju 4836782
Update README.md
emanuelcaaju 9a40f33
Update README.md
emanuelcaaju 64999a2
New orange
emanuelcaaju 136fc2f
I'm created a border radius for exemple
emanuelcaaju da3d199
Create a Paddings
emanuelcaaju 0f02c48
Create a new Padding small
emanuelcaaju 3837954
Created new tokens
emanuelcaaju 18fc874
Created new tokens
emanuelcaaju ec84de7
Created new tokens
emanuelcaaju File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,81 @@ | ||
# mhc-fe | ||
my health connect frontend repository with design studio and frontend source code | ||
|
||
## My health connect frontend repository with design studio and frontend source code | ||
|
||
## How to integrate figma, figma token to this repository | ||
|
||
Design tokens are the visual design atoms of the design system — specifically, they are named entities that store visual design attributes, we can say they are variables that can be given a value. | ||
emanuelcaaju marked this conversation as resolved.
Show resolved
Hide resolved
emanuelcaaju marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Design tokens can be attributes such as: color, font, font size, spacing, border thickness, opacity, radius, shadow. | ||
|
||
A good example of thinking about its application in the context of a project is to look at theme management, where we can have a color guide for light mode, or dark mode, or even themes for seasonal periods such as Black friday, Christmas, for example. | ||
|
||
When we have pages in light mode, we use colors for fonts, colors for background, colors for buttons, colors for SVG illustrations other than dark mode, this is because we need to guarantee the contrast and good usability and accessibility of this product, be it a web or mobile. | ||
|
||
And when we talk about a project with many pages, let's say in passing that without a well-elaborated design system, and with constant maintenance, it will be quite tiring to make changes and future updates with a certain speed. | ||
|
||
Implementing design tokens in a project gives it scalability, allowing that by replacing the value of a few tokens, you have an entire project already re-purposed and ready for use, without much intervention from a developer. | ||
|
||
Let's see an example: | ||
|
||
<img width="435" alt="image" src="https://user-images.githubusercontent.com/104807903/200140203-c7681c8a-eeff-4691-a7dd-2d74886b83df.png"> | ||
|
||
When we look at the situation above, we understand that when we have a darker background, it was necessary for the designer to also change the color of the button, and also the color of the label of this button so that we could have a good reading of it. | ||
|
||
Now think that without the use of tokens, it should be necessary for the developer to replace these values in hexadecimal, for example: | ||
|
||
Background: #FFFFFF -> #3D3D3D<br> | ||
Fill Button: #3D3D3D -> #EEEEEE<br> | ||
Color Text: #FFFFFF -> #5C5C5C<br> | ||
|
||
That is, when the designer needs to establish some change, the developer is impacted by it in a substantial way, where he would now need to review his code in search of correcting these colors throughout the project. | ||
|
||
Now, when using Design tokens we can have the following hypothesis | ||
|
||
Background: $background.color<br> | ||
Fill Button: $buttom.color<br> | ||
ColorText: $text.color<br> | ||
|
||
The developer sees the colors as variables, and it is the design who establishes the values that this variable will receive, the design in this way has the autonomy to define changes to the colors, and the developer no longer needs to carry out a review of the project, because every it will get the changes defined by expecting the attribute with a variable value | ||
|
||
Figma is an amazing tool, without a doubt, but without the help of third-party software, it still doesn't have the ability to build all these tokens on its own. So, for that, we use a plugin, Figma tokens. | ||
|
||
Figma tokens allows us to create the themes that will be used in the projects, as well as the tokens that will be used in each of them, and the plugin takes care of building a JSON object that can be consumed by the project developers. | ||
|
||
To use it just install it through the link (https://www.figma.com/community/plugin/843461159747178978/Figma-Tokens) | ||
|
||
Today we also have all the documentation that is maintained by the Figma Tokens team, where we can be consulting the future updates of the plugin and how to use it (https://docs.figmatokens.com/) | ||
|
||
### How to integrate figma, figma token to this repository | ||
|
||
To use project tokens, you will first need to have your figma tokens plugin installed, and then have an account on your github so that you can later consume existing tokens in your commits with token updates. | ||
|
||
<ol> | ||
<li>Login to your github account</li> | ||
<li>Go to the user's photo located in the upper right corner of the screen and click to display the options</li> | ||
<li>click settings</li> | ||
<li>On the left side you will have a long list, go to the last option "developer settings" and click on it</li> | ||
<li>Again in the left column, in Personal access token, choose the option: "Tokens (Classic)"</li> | ||
<li>Click on Generate New Token and choose the option "Generate New Token (Classic)"</li> | ||
<li>Now we will fill this form with the following information | ||
<ul> | ||
<li>in Note: give a name for the token that will be generated, We suggest "My Health Connect Token" without quotes</li> | ||
<li>on Expiration: choose the option "no expiration"</li> | ||
<li>In Select Scopes: but only the first option "repo" and the sets within it will also be marked automatically</li> | ||
<li>At the end of the form, click on the green "Generate token" button</li> | ||
<li>now reserve the generated token, as we will use it later inside Figma tokens</li> | ||
</ul></li> | ||
<li>Run the Figma Tokens plugin in figma on the My heath Connect project page</li> | ||
<li>Go to the settings menu, located at the top of the plugin screen</li> | ||
<li>Choose Github option for token storage</li> | ||
<li>Then click on the add new credential button</li> | ||
<li>Now we will fill this form with the following information | ||
<ul> | ||
<li>Name: Give this form a name of your choice, we recommend "My Health Connect Tokens", without the quotes</li> | ||
<li>Personal Access Token: In personal access token, we will paste the previously generated access token on Github</li> | ||
<li>Repository: Now just enter in the repository field "Xcov19/mhc-fe" without the quotes (here we are saying where the file with the tokens will be hosted)</li> | ||
<li>Branch: Enter "develop" without the quotes (this is the branch that will be used so we can update the tokens)</li> | ||
<li>File Path: Now you will enter the filename on Github "theme.json" without quotes</li> | ||
<li>click save</li> | ||
<li>make your first commit</li> | ||
</ul></li> | ||
</ol> |
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
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.
Uh oh!
There was an error while loading. Please reload this page.