-
Notifications
You must be signed in to change notification settings - Fork 147
docs(design-tokens): Creates docs for design tokens. #3786
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
4af58dd
docs(design-tokens): creates documentation for design tokens.
edonehoo dcf788f
Working on design tokens doc structure.
edonehoo daf5827
Continues adding content and outlining the docs structure.
edonehoo 1ce4cde
Ready design tokens docs for draft preview.
edonehoo c127c80
Update page info.
edonehoo 33c76dc
Add to side nav.
edonehoo 0a68c45
Merge branch 'main' into iss1258
edonehoo 5bac9c1
Adjust section label.
edonehoo 755447f
Update packages/documentation-site/patternfly-docs/patternfly-docs.co…
edonehoo 84aeaa8
Small typos.
edonehoo 1afaf67
Update sidebar.'
edonehoo b3ae361
Updates to the charts about page and charts colors page (#3759)
aratti96 986495e
chore(release): releasing packages [ci skip]
patternfly-build 07ddbe5
Update broken links on menu accessibility docs
nicolethoen d5ff4c2
Update broken links on menu design guidelines
nicolethoen 9e75254
chore(release): releasing packages [ci skip]
patternfly-build 77bf3e3
Removing the redudancy in the file. Use is described above the text. …
kuklas 8a8e808
chore(release): releasing packages [ci skip]
patternfly-build f0af60b
docs(design-guidelines) Updates content for consistency. (#3782)
edonehoo 30ce913
chore(release): releasing packages [ci skip]
patternfly-build 6e87200
chore(docs-framework): add class on example load (#3789)
wise-king-sullyman a7164b2
chore(release): releasing packages [ci skip]
patternfly-build b4c8bf9
docs(terminology): Updates n/a and -- descriptions for clarity. (#3783)
edonehoo 5505299
chore(release): releasing packages [ci skip]
patternfly-build 47b5f74
feat(dark-theme): replace dark theme switcher with toggle group (#3788)
wise-king-sullyman 1fe9735
chore(release): releasing packages [ci skip]
patternfly-build 3c03fff
chore(JumpLinks): updated a11y docs to match template (#3808)
thatblindgeye bd46721
fix(react-drag-drop): add react-drag-drop to latest version (#3801)
kmcfaul d430387
chore(release): releasing packages [ci skip]
patternfly-build 7b95d88
fix: clean up versions and showdown deps (#3816)
nicolethoen a74cc87
chore(release): releasing packages [ci skip]
patternfly-build 5e9bb58
Added expand/collapse all cards info (#3815)
kaedward 4ed6e7a
chore(release): releasing packages [ci skip]
patternfly-build e375fdc
fix: add charts dark theme stylesheet (#3802)
nicolethoen abb0e69
chore(release): releasing packages [ci skip]
patternfly-build 47c5cae
fix(drag drop): add drag drop to 5.1 versions.json (#3817)
kmcfaul bf9a278
chore(release): releasing packages [ci skip]
patternfly-build 6fc3bb6
fix: add virtualized table to extensions staging (#3819)
nicolethoen 86c07c6
chore(release): releasing packages [ci skip]
patternfly-build 51c2b17
chore(Sidebar): updated a11y docs (#3813)
thatblindgeye ae88bcd
chore(AboutModal): updated a11y docs to match template (#3796)
thatblindgeye 602f0c4
chore(release): releasing packages [ci skip]
patternfly-build 7163a6d
Makes some content updates.
edonehoo f0f4ae7
fix: prepare org for component groups release (#3822)
nicolethoen 3b87291
chore(release): releasing packages [ci skip]
patternfly-build 69a8869
Update github actions to add new issues to project board (#3818)
jessiehuff ef5c617
chore(release): releasing packages [ci skip]
patternfly-build d37ef97
docs(accessibility-fundamentals): Updates content as part of audit. (…
edonehoo 8b3d55c
docs(patternfly-accessibility): Updates content as part of content au…
edonehoo aad9098
docs(accessibility-development): Updates documentation as part of con…
edonehoo 1a60605
docs(accessibility-scorecard): Updates content as part of content aud…
edonehoo d773f4e
chore(deps): add react as a dep at the root level (#3834)
wise-king-sullyman e105f46
chore(release): releasing packages [ci skip]
patternfly-build 151cff0
chore(Skeleton): updated a11y docs to match template (#3824)
thatblindgeye 9af62e5
chore(HelperText): updated a11y docs to match template (#3805)
thatblindgeye a493800
chore(ExpandableSection): updated a11y docs to match template (#3803)
thatblindgeye 5af2f2a
chore(CodeEditor): updated a11y documentation to match template (#3799)
thatblindgeye 82249bc
chore(release): releasing packages [ci skip]
patternfly-build d3a4acc
chore(deps): bump semver from 5.7.1 to 5.7.2 (#3841)
dependabot[bot] 6cf51d8
chore(deps): bump @babel/traverse from 7.18.6 to 7.23.6 (#3842)
dependabot[bot] e0fb0b5
chore(release): releasing packages [ci skip]
patternfly-build 98bbeb8
docs(level): expands design guidelines for level layout. (#3673)
edonehoo de0b76b
[Snyk] Fix for 1 vulnerabilities (#3828)
patternfly-build c9eb93c
chore(release): releasing packages [ci skip]
patternfly-build 08f307d
chore(deps): bump postcss from 8.4.31 to 8.4.32 (#3844)
dependabot[bot] 62db391
chore(release): releasing packages [ci skip]
patternfly-build 4ae7d2f
[Snyk] Security upgrade puppeteer from 18.2.0 to 19.7.3 (#3843)
patternfly-build 4f9b45f
chore(deps): bump qs from 6.5.2 to 6.5.3 (#3309)
dependabot[bot] 7b84dce
fix: try a v6 release
nicolethoen e45742b
chore(release): releasing packages [ci skip]
patternfly-build 5362368
fix: use surge for v6 staging rather than aws bucket
nicolethoen e278614
fix: bump docs-framework version in docs-site
nicolethoen 32b4e39
chore(release): releasing packages [ci skip]
patternfly-build 6016d25
fix: try publish v6 to aws (#3845)
nicolethoen 063ca3e
chore(release): releasing packages [ci skip]
patternfly-build aae40b5
fix: update white space to test publishing to aws
nicolethoen 75b6d47
chore(release): releasing packages [ci skip]
patternfly-build 8d3d62d
fix: PF brand logo in masthead to inline svg
nicolethoen 1013af4
chore(release): releasing packages [ci skip]
patternfly-build 3155cb4
fix: bump puppeteer (#3858)
nicolethoen 8db0128
chore(release): releasing packages [ci skip]
patternfly-build be52327
fix: Update brand svg id to avoid duplicate ids
nicolethoen 85de262
chore(release): releasing packages [ci skip]
patternfly-build 9a1e52e
Fix: update logo svg (#3861)
nicolethoen 70fdeaa
chore(release): releasing packages [ci skip]
patternfly-build d13b35e
fix: Update versions.json to include drag drop alpha
nicolethoen 37b304b
chore(release): releasing packages [ci skip]
patternfly-build 9c567ca
fix: bump docs framework version
nicolethoen 0146d86
chore(release): releasing packages [ci skip]
patternfly-build 19e2541
Continued edits.
edonehoo 019a275
Working on content.
edonehoo 87ba42e
Updates design info and adds images.
edonehoo 5dfd40c
Merge branch 'v6' into iss1258
edonehoo a16e35c
Updates to images.
edonehoo f8d2ce3
Continued content updates.
edonehoo ca4bef5
Smooths out formatting and content.
edonehoo e527f0a
add all tokens documentation
nicolethoen 1870901
Merge remote-tracking branch 'upstream/v6' into iss1258
nicolethoen f802226
bump to design-tokens version with versioned css
nicolethoen 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
79 changes: 79 additions & 0 deletions
79
packages/documentation-site/patternfly-docs/content/design-tokens/design-tokens.md
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 |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| --- | ||
| id: About | ||
| section: design-tokens | ||
| --- | ||
|
|
||
| # Design tokens | ||
|
|
||
| This guide outlines PatternFly's use of design tokens. You should familiarize yourself with the details across this guide to learn about the purpose and implementation of PatternFly's tokens. | ||
|
|
||
| PatternFly's tokens are only available within Figma, so it's important that you follow our [Figma migration](/design-tokens/migrate) guide if necessary. | ||
|
|
||
| ## What are design tokens | ||
|
|
||
| Design tokens are variables that store visual design attributes, like color, typography, and spacing. A design token has a name and value that represents the visual design information it contains. | ||
|
|
||
| ## Why use tokens | ||
|
|
||
| Using design tokens helps maintain consistency across product design processes by ensuring that designers use the same colors for the same use cases. | ||
|
|
||
| Tokens also enable easier maintenance. Whenever a color is changed as part of a redesign or update,related tokens are automatically updated to reflect this change. This means that developers won't have to make any changes to code to ensure that their product is up to date with the latest recommendations. Likewise, designers will see that their designs automatically update to reflect any changes. | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## PatternFly design tokens | ||
|
|
||
| ### How to read tokens | ||
|
|
||
| Tokens can be read from left to right, with each part separated by a forward slash (/): | ||
|
|
||
| `scope / component / category / property / concept / variant / state` | ||
|
|
||
| Each piece represents different information: | ||
| - **Scope:** The range of the token. For example, `global` signifies that a token applies across the system. | ||
| - **Component:** The component that the token relates to. | ||
| - **Category:** NEED INFO | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
| - **Property:** NEED INFO | ||
| - **Concept:** NEED INFO | ||
| - **Variant:** The variant type of the token's component.For example, a variant may be `plain` or `primary`. | ||
| - **State:** The state that the component is in. This is typically `disabled`, `hover`, or `active`. | ||
|
|
||
| Note that all PatternFly tokens also begin with `pf`. | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Token layers | ||
|
|
||
| PatternFly tokens have 3 layers: a **palette layer**, a **base layer**, and a **semantic layer**. | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
|  | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
| #### **Palette layer** | ||
|
|
||
| Palette layer tokens contain the colors in [PatternFly color palettes](/design-foundations/colors#patternfly-palettes). | ||
|
|
||
| If you've used PatternFly previously, these values resemble some of the CSS variables that you may be familiar with. They | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of our other tokens are quite like existing CSS variables, too, like spacers and status colors. Maybe @lboehling would have some good words for describing the palette layer? |
||
|
|
||
| **Add:** example image and/or `example / token / style / 000` | ||
|
|
||
| #### **Base layer** | ||
|
|
||
| Base layer tokens contain a wide range of tokens that the semantic layer can choose from. | ||
|
|
||
| These values are grouped conceptually and named numerically. There are no duplicate values within a concept group. | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
| **Add:** example image and/or `example / token / style / 000` | ||
|
|
||
| #### **Semantic layer** | ||
|
|
||
| Semantic layer tokens will be the value that you see the most frequently. These values are the top-level tokens that are grouped conceptually and named semantically. | ||
|
edonehoo marked this conversation as resolved.
Outdated
|
||
|
|
||
| Most of the time, these reference base tokens, but can also reference other semantic tokens | ||
|
|
||
| **Add:** example image and/or `example / token / style / 000` | ||
|
|
||
| ### Examples of token use | ||
|
|
||
| #### **Color tokens** | ||
|
|
||
| **Add:** example image and/or `example / token / style / 000` | ||
|
|
||
| #### **Spacing tokens** | ||
|
|
||
| **Add:** example image and/or `example / token / style / 000` | ||
13 changes: 13 additions & 0 deletions
13
...cumentation-site/patternfly-docs/content/design-tokens/designing-with-tokens.md
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| id: Designing with tokens | ||
| section: design-tokens | ||
| --- | ||
|
|
||
| As a designer, you can access and use our token libraries in Figma. | ||
|
|
||
| NEED INFO | ||
|
|
||
| ## Figma instructions | ||
|
|
||
| ## Figma overview | ||
|
|
12 changes: 12 additions & 0 deletions
12
...umentation-site/patternfly-docs/content/design-tokens/developing-with-tokens.md
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| id: Developing with tokens | ||
| section: design-tokens | ||
| --- | ||
|
|
||
| ## Installing tokens | ||
|
|
||
| To develop with PatternFly tokens, you must first install the tokens package from `@patternfly/react-tokens`. | ||
|
|
||
| NEED INFO | ||
|
|
||
| ### Using tokens with React |
Binary file added
BIN
+51 KB
...tation-site/patternfly-docs/content/design-tokens/img/design-layers-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
packages/documentation-site/patternfly-docs/content/design-tokens/migrate-to-tokens
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| id: Migrate to tokens | ||
| section: design-tokens | ||
| --- | ||
|
|
||
| This guide provides instructions for migrating to tokens from PatternFly's previous design and wireframe kits. | ||
|
|
||
| ## How to migrate a product to tokens | ||
|
|
||
| ### For designers | ||
|
|
||
| Designers should migrate all designs into Figma, so that they can be updates to use tokens. | ||
|
|
||
| Once you've completed your migration you can begin to [design with tokens.](/design-tokens/design-with-tokens) | ||
|
|
||
| ### For developers | ||
|
|
||
| Developers will need to download token packages and update all colors and styles to use tokens, instead of CSS variables. | ||
|
|
||
| This change may resemble the following: | ||
|
|
||
| ```code example``` | ||
|
|
||
| For more detailed instructions, refer to our [develop with tokens](/design/tokens/develop-with-tokens) guide. |
6 changes: 6 additions & 0 deletions
6
...s/documentation-site/patternfly-docs/content/design-tokens/patternfly-tokens.md
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| id: PatternFly tokens | ||
| section: design-tokens | ||
| --- | ||
|
|
||
| ## All tokens |
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.