Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 Sep 21, 2023
dcf788f
Working on design tokens doc structure.
edonehoo Sep 28, 2023
daf5827
Continues adding content and outlining the docs structure.
edonehoo Oct 16, 2023
1ce4cde
Ready design tokens docs for draft preview.
edonehoo Oct 16, 2023
c127c80
Update page info.
edonehoo Oct 16, 2023
33c76dc
Add to side nav.
edonehoo Oct 16, 2023
0a68c45
Merge branch 'main' into iss1258
edonehoo Oct 16, 2023
5bac9c1
Adjust section label.
edonehoo Oct 16, 2023
755447f
Update packages/documentation-site/patternfly-docs/patternfly-docs.co…
edonehoo Oct 17, 2023
84aeaa8
Small typos.
edonehoo Oct 17, 2023
1afaf67
Update sidebar.'
edonehoo Oct 19, 2023
b3ae361
Updates to the charts about page and charts colors page (#3759)
aratti96 Oct 23, 2023
986495e
chore(release): releasing packages [ci skip]
patternfly-build Oct 23, 2023
07ddbe5
Update broken links on menu accessibility docs
nicolethoen Oct 23, 2023
d5ff4c2
Update broken links on menu design guidelines
nicolethoen Oct 23, 2023
9e75254
chore(release): releasing packages [ci skip]
patternfly-build Oct 23, 2023
77bf3e3
Removing the redudancy in the file. Use is described above the text. …
kuklas Oct 27, 2023
8a8e808
chore(release): releasing packages [ci skip]
patternfly-build Oct 27, 2023
f0af60b
docs(design-guidelines) Updates content for consistency. (#3782)
edonehoo Oct 27, 2023
30ce913
chore(release): releasing packages [ci skip]
patternfly-build Oct 27, 2023
6e87200
chore(docs-framework): add class on example load (#3789)
wise-king-sullyman Oct 27, 2023
a7164b2
chore(release): releasing packages [ci skip]
patternfly-build Oct 27, 2023
b4c8bf9
docs(terminology): Updates n/a and -- descriptions for clarity. (#3783)
edonehoo Oct 30, 2023
5505299
chore(release): releasing packages [ci skip]
patternfly-build Oct 30, 2023
47b5f74
feat(dark-theme): replace dark theme switcher with toggle group (#3788)
wise-king-sullyman Nov 1, 2023
1fe9735
chore(release): releasing packages [ci skip]
patternfly-build Nov 1, 2023
3c03fff
chore(JumpLinks): updated a11y docs to match template (#3808)
thatblindgeye Nov 7, 2023
bd46721
fix(react-drag-drop): add react-drag-drop to latest version (#3801)
kmcfaul Nov 7, 2023
d430387
chore(release): releasing packages [ci skip]
patternfly-build Nov 7, 2023
7b95d88
fix: clean up versions and showdown deps (#3816)
nicolethoen Nov 10, 2023
a74cc87
chore(release): releasing packages [ci skip]
patternfly-build Nov 10, 2023
5e9bb58
Added expand/collapse all cards info (#3815)
kaedward Nov 10, 2023
4ed6e7a
chore(release): releasing packages [ci skip]
patternfly-build Nov 10, 2023
e375fdc
fix: add charts dark theme stylesheet (#3802)
nicolethoen Nov 13, 2023
abb0e69
chore(release): releasing packages [ci skip]
patternfly-build Nov 13, 2023
47c5cae
fix(drag drop): add drag drop to 5.1 versions.json (#3817)
kmcfaul Nov 13, 2023
bf9a278
chore(release): releasing packages [ci skip]
patternfly-build Nov 13, 2023
6fc3bb6
fix: add virtualized table to extensions staging (#3819)
nicolethoen Nov 14, 2023
86c07c6
chore(release): releasing packages [ci skip]
patternfly-build Nov 14, 2023
51c2b17
chore(Sidebar): updated a11y docs (#3813)
thatblindgeye Nov 17, 2023
ae88bcd
chore(AboutModal): updated a11y docs to match template (#3796)
thatblindgeye Nov 17, 2023
602f0c4
chore(release): releasing packages [ci skip]
patternfly-build Nov 17, 2023
7163a6d
Makes some content updates.
edonehoo Nov 20, 2023
f0f4ae7
fix: prepare org for component groups release (#3822)
nicolethoen Nov 21, 2023
3b87291
chore(release): releasing packages [ci skip]
patternfly-build Nov 21, 2023
69a8869
Update github actions to add new issues to project board (#3818)
jessiehuff Nov 30, 2023
ef5c617
chore(release): releasing packages [ci skip]
patternfly-build Nov 30, 2023
d37ef97
docs(accessibility-fundamentals): Updates content as part of audit. (…
edonehoo Dec 13, 2023
8b3d55c
docs(patternfly-accessibility): Updates content as part of content au…
edonehoo Dec 13, 2023
aad9098
docs(accessibility-development): Updates documentation as part of con…
edonehoo Dec 13, 2023
1a60605
docs(accessibility-scorecard): Updates content as part of content aud…
edonehoo Dec 13, 2023
d773f4e
chore(deps): add react as a dep at the root level (#3834)
wise-king-sullyman Dec 13, 2023
e105f46
chore(release): releasing packages [ci skip]
patternfly-build Dec 13, 2023
151cff0
chore(Skeleton): updated a11y docs to match template (#3824)
thatblindgeye Dec 13, 2023
9af62e5
chore(HelperText): updated a11y docs to match template (#3805)
thatblindgeye Dec 13, 2023
a493800
chore(ExpandableSection): updated a11y docs to match template (#3803)
thatblindgeye Dec 13, 2023
5af2f2a
chore(CodeEditor): updated a11y documentation to match template (#3799)
thatblindgeye Dec 13, 2023
82249bc
chore(release): releasing packages [ci skip]
patternfly-build Dec 13, 2023
d3a4acc
chore(deps): bump semver from 5.7.1 to 5.7.2 (#3841)
dependabot[bot] Dec 13, 2023
6cf51d8
chore(deps): bump @babel/traverse from 7.18.6 to 7.23.6 (#3842)
dependabot[bot] Dec 13, 2023
e0fb0b5
chore(release): releasing packages [ci skip]
patternfly-build Dec 13, 2023
98bbeb8
docs(level): expands design guidelines for level layout. (#3673)
edonehoo Dec 13, 2023
de0b76b
[Snyk] Fix for 1 vulnerabilities (#3828)
patternfly-build Dec 13, 2023
c9eb93c
chore(release): releasing packages [ci skip]
patternfly-build Dec 13, 2023
08f307d
chore(deps): bump postcss from 8.4.31 to 8.4.32 (#3844)
dependabot[bot] Dec 14, 2023
62db391
chore(release): releasing packages [ci skip]
patternfly-build Dec 14, 2023
4ae7d2f
[Snyk] Security upgrade puppeteer from 18.2.0 to 19.7.3 (#3843)
patternfly-build Dec 14, 2023
4f9b45f
chore(deps): bump qs from 6.5.2 to 6.5.3 (#3309)
dependabot[bot] Dec 14, 2023
7b84dce
fix: try a v6 release
nicolethoen Dec 14, 2023
e45742b
chore(release): releasing packages [ci skip]
patternfly-build Dec 14, 2023
5362368
fix: use surge for v6 staging rather than aws bucket
nicolethoen Dec 15, 2023
e278614
fix: bump docs-framework version in docs-site
nicolethoen Dec 15, 2023
32b4e39
chore(release): releasing packages [ci skip]
patternfly-build Dec 15, 2023
6016d25
fix: try publish v6 to aws (#3845)
nicolethoen Dec 18, 2023
063ca3e
chore(release): releasing packages [ci skip]
patternfly-build Dec 18, 2023
aae40b5
fix: update white space to test publishing to aws
nicolethoen Dec 20, 2023
75b6d47
chore(release): releasing packages [ci skip]
patternfly-build Dec 20, 2023
8d3d62d
fix: PF brand logo in masthead to inline svg
nicolethoen Dec 20, 2023
1013af4
chore(release): releasing packages [ci skip]
patternfly-build Dec 20, 2023
3155cb4
fix: bump puppeteer (#3858)
nicolethoen Jan 12, 2024
8db0128
chore(release): releasing packages [ci skip]
patternfly-build Jan 12, 2024
be52327
fix: Update brand svg id to avoid duplicate ids
nicolethoen Jan 12, 2024
85de262
chore(release): releasing packages [ci skip]
patternfly-build Jan 12, 2024
9a1e52e
Fix: update logo svg (#3861)
nicolethoen Jan 15, 2024
70fdeaa
chore(release): releasing packages [ci skip]
patternfly-build Jan 15, 2024
d13b35e
fix: Update versions.json to include drag drop alpha
nicolethoen Jan 23, 2024
37b304b
chore(release): releasing packages [ci skip]
patternfly-build Jan 23, 2024
9c567ca
fix: bump docs framework version
nicolethoen Feb 1, 2024
0146d86
chore(release): releasing packages [ci skip]
patternfly-build Feb 1, 2024
19e2541
Continued edits.
edonehoo Feb 1, 2024
019a275
Working on content.
edonehoo Feb 2, 2024
87ba42e
Updates design info and adds images.
edonehoo Feb 5, 2024
5dfd40c
Merge branch 'v6' into iss1258
edonehoo Feb 6, 2024
a16e35c
Updates to images.
edonehoo Feb 12, 2024
f8d2ce3
Continued content updates.
edonehoo Feb 14, 2024
ca4bef5
Smooths out formatting and content.
edonehoo Feb 15, 2024
e527f0a
add all tokens documentation
nicolethoen Feb 17, 2024
1870901
Merge remote-tracking branch 'upstream/v6' into iss1258
nicolethoen Feb 27, 2024
f802226
bump to design-tokens version with versioned css
nicolethoen Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = (_env, argv) => {
/react-[\w-]+\\src\\.*\\examples/, // fix for Windows
/react-[\w-]+\/patternfly-docs\/.*\/examples/, //fixes for extensions
/react-[\w-]+\\patternfly-docs\\.*\\examples/,
path.resolve(__dirname, '../../../../node_modules/@patternfly/design-tokens/patternfly-docs/content')
].concat(includePaths.map(path => new RegExp(path))),
exclude: [
path.resolve(__dirname, '../../node_modules'), // Temporarily compile theme using webpack for development
Expand Down
6 changes: 6 additions & 0 deletions packages/documentation-framework/templates/mdx.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
margin-bottom: var(--pf-v6-c-content--MarginBottom);
}

.ws-image {
text-align: center;
width: "600px";
}

/* Table styles */
/* Undo patternfly reset to respect MD table styles */
.ws-table td[align="center"],
Expand All @@ -68,6 +73,7 @@
table-layout: fixed;
width: 100%;
}

.ws-table td > code,
.ws-table th > code,
.ws-table tr > code {
Expand Down
3 changes: 2 additions & 1 deletion packages/documentation-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"screenshots": "pf-docs-framework screenshots"
},
"dependencies": {
"@patternfly/documentation-framework": "6.0.0-alpha.10",
"@patternfly/documentation-framework": "6.0.0-alpha.12",
"@patternfly/quickstarts": "5.1.0",
"@patternfly/react-catalog-view-extension": "5.0.0",
"@patternfly/react-console": "5.0.0",
Expand All @@ -27,6 +27,7 @@
"@patternfly/react-user-feedback": "5.0.0",
"@patternfly/react-component-groups": "5.0.0-prerelease.10",
"@patternfly/react-virtualized-extension": "5.0.0",
"@patternfly/design-tokens": "1.0.2",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"showdown": "^2.1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
id: About tokens
section: tokens
---

**Design tokens** are variables that store visual design attributes like color, typography, and spacing. Tokens have a name and value that conveys their associated design style, making their purpose clear and recognizable.

PatternFly's tokens are set up as variables and styles within Figma, and are exported as CSS variables for use in development. Tokens are only available as part of the PatternFly 6 release, so make sure you [upgrade to PatternFly 6](/get-started/upgrade) in order to take advantage of tokens.

To learn more about designing with the PatternFly Figma library, [refer to our onboarding guide.](/get-started/design#figma-library)

You can also [view the complete list of PatternFly's design tokens.](/tokens/all-patternfly-tokens)

## Why use tokens?

A token system enables a a shared language for building UIs and helps support better consistency and maintenance across the PatternFly design system.

### Consistency
Tokens help maintain consistency across product design processes by ensuring that the same colors and styles are always used for the same use cases. By removing the decision making that would otherwise go into choosing the right color, heading level, spacing, and so on, designs can be created more consistently and efficiently.

### Easier maintenance
Tokens also enable easier design system maintenance. Whenever a color is changed as part of a redesign or update, all related tokens are automatically updated to reflect this change. This means that developers won't have to make any code changes to ensure that a product is up to date with the latest PatternFly recommendations. Likewise, designers will see that their Figma designs automatically update to reflect any changes made to tokens.

## Token names

PatternFly token names are composed of a `--pf-t` prefix, a version number, and a series of token segments, separated by double hyphens.

<div class="ws-image" style="text-align: center;">
<img src="./img/token-name.png" alt="PatternFly token naming structure." width="600px"/>
</div>
<br />

Each token segment represents a different type of style information. If a segment isn't relevant for a particular token then it will be skipped in the token's name.

| **Segment** | **Description** |
| --- | --- |
| Scope | The token's range, such as *global* or *chart*.
| Component | The component that the token relates to, such as *icon*, *background*, or *text*.
| Property | The style property of a component, such as *color*, *size*, *width*, or *radius*.
| Concept | The token's higher level concepts, such as *status*, *primary*, or *action*, which have different variant options.
| Variant | The variant of a component or concept, such as *link*, *plain*, *warning*, or *success*.
| State | The state that the component is in, such as *default*, *hover*, or *active*.

## Token layers

The PatternFly token system has 3 layers: palette tokens, base tokens, and semantic tokens.

* **Palette tokens** use [PatternFly color palettes](/design-foundations/colors#patternfly-palettes) to create a color foundation for other token layers to reference.

* **Base tokens** expand on the palette layer to apply PatternFly colors to concepts. They also introduce additional concepts, like spacing and borders. Base tokens are grouped conceptually and named numerically, with no duplicate values in a concept group.

* **Semantic tokens** are the top-level tokens that are grouped conceptually and named semantically. These are built with base tokens and are the tokens that you will see and use the majority of the time. The naming is intentionally chosen to support the proper and relevant use of a token, which makes design consistency easier for everyone.

<div class="ws-image" style="text-align: center;">
<img src="./img/token-layers-example.png" alt="PatternFly token layer names for the same color value." width="600px"/>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
id: Design with tokens
section: tokens
---

## Penta design kit

PatternFly tokens are only available as part of the PatternFly 6 [Penta design kit.]() In order to make use of our token system, you will need to [upgrade to PatternFly 6](/get-started/upgrade).

## What is in the Penta design kit

### Tokens

Our tokens are set up at a high level as Figma [variables](https://help.figma.com/hc/en-us/articles/15339657135383-Guide-to-variables-in-Figma) and [styles](https://help.figma.com/hc/en-us/articles/360039238753-Styles-in-Figma).

In Figma, the variable names look similar to [token names](/tokens/all-patternfly-tokens), but will be separated by a forward slash (/) instead of a double hyphen (--).

<div style="text-align: center;">
<img src="./img/token-example-brand.png" alt="Table of brand color tokens." width="600px"/>
</div>
<br />

### Penta component library

You will have access to all PatternFly tokens when you install the component library. Penta components are built with tokens. From the colors used, to the spacing of elements, to the font size: tokens control it all!

<div style="text-align: center;">
<img src="./img/component-tokens.png" alt="PatternFly alert components built with Figma tokens." width="700px"/>
</div>

## Using the Penta design kit

To install the Penta design kit, [find instructions in our design onboarding guide.](/get-started/design#figma-library)

### Using Penta components

As you insert a component into a design workspace, you can adjust properties and variable modes to customize the appearance to your needs.

<div style="text-align: center;">
<img src="./img/component-instance.png" alt="PatternFly alert components built with Figma tokens." width="350px"/>
</div>
<br />

Once you've inserted a component into your workspace, you can continue to customize different parts of its appearance in [Figma's design sidebar](https://help.figma.com/hc/en-us/articles/360039832014-Design-prototype-and-explore-layer-properties-in-the-right-sidebar). Here, you will be able to see all tokens that can be used within a particular design property.

### Making customizations

Occasionally, you may find that you need to customize a design beyond what the PatternFly component natively supports. For example, adding text or adding custom spacing.

Our tokens are intentionally scoped so that they can only be used to modify relevant and related visual attributes. For example, a token may have its color scope limited so that it can only be used as a fill color or a stroke color. This means that, while you can use tokens to customize a design, you will only be able to use certain tokens in certain situations. This helps ensure that you're using tokens that are conceptually related to each design element that you're working on.

## Migrate to tokens

Our tokens are only available within Figma. If you've previously designed with PatternFly by using our Sketch design kits, you will need to begin to create all new product designs within Figma.

If you have any existing Sketch-based designs that you want to migrate into Figma, you will need to manually recreate each UI mockup using the Penta component library.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: Develop with tokens
section: tokens
---

## Using tokens in code

PatternFly tokens are exported from Figma and transformed into CSS variables for use in code. You can find token files in [PatternFly's core HTML repo](https://github.com/patternfly/patternfly/tree/v6/src/patternfly/base/tokens) and refer to [our list of all tokens](/tokens/all-patternfly-tokens).

When using tokens in code: if there's a semantic token that matches your needs then you should always use that. In the event that there isn't a semantic token, then you can use a base token. You should not use palette tokens, as they are the foundation of our token system and there should always be a better base or semantic token to use.

### Dark theme support

Our token system is available for both light and dark themes. We have [separate tokens for dark theme](https://github.com/patternfly/patternfly/blob/v6/src/patternfly/base/tokens/_tokens-dark.scss) to ensure proper contrast ratios. For guidance on enabling and supporting dark theme in your product, refer to our [dark theme handbook.](/developer-resources/dark-theme-handbook)

## Migrate to tokens

To support tokens, PatternFly's global CSS variable system has been updated and variable names have been updated across all PatternFly components and extensions. To migrate to our token system, all you need to do is [upgrade to PatternFly 6](/get-started/upgrade).

However, if you make customizations to PatternFly components in your product, or use CSS overrides, you will need to manually update your CSS variable names to match an appropriate [token variable](/tokens/all-patternfly-tokens). There is no one-to-one recommendation for any particular CSS variable, so you will need to choose the most appropriate token for your use case.

Once you've completed your migration, you're ready to continue developing with tokens!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ if (process.env.EXTENSIONS_ONLY === 'true') {
sideNavItems: [
{ section: 'get-started' },
{ section: 'design-foundations' },
{ section: 'tokens' },
{ section: 'accessibility' },
{ section: 'UX writing' },
{ section: 'components' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = (sourceMD, sourceProps, sourceFunctionDocs) => {
sourceMD(path.join(contentBase, 'accessibility/**/*.md'), 'accessibility');
sourceMD(path.join(contentBase, 'design-guidelines/**/*.md'), 'design-guidelines');
sourceMD(path.join(contentBase, 'training/**/*.md'), 'training');
sourceMD(path.join(contentBase, 'tokens/**/*.md'), 'tokens');

// Gallery pages
const galleryBase = path.join(__dirname, '../patternfly-docs/pages');
Expand All @@ -27,6 +28,12 @@ module.exports = (sourceMD, sourceProps, sourceFunctionDocs) => {
.replace('package.json', 'pages');
sourceMD(path.join(themePagesPath, '*.md'), 'pages-overview');

// Design tokens
const designTokensPath = require
.resolve('@patternfly/design-tokens/package.json')
.replace('package.json', 'patternfly-docs/content');
sourceMD(path.join(designTokensPath, '/*.md'), 'tokens');

// Core MD
const coreDocsPath = require
.resolve('@patternfly/patternfly/package.json')
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,13 @@
node-addon-api "^3.2.1"
node-gyp-build "^4.3.0"

"@patternfly/design-tokens@1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@patternfly/design-tokens/-/design-tokens-1.0.2.tgz#7d4114774e4e232614ab786fc32f0a856a269588"
integrity sha512-IJCq2VgDkdQMPWF9h9SxtPk0qOEMWEB0etcQGQi5t+eAA0M/0Xf+4o+W5tQmhmTBWCZ8Hunzh6btubys64U71w==
dependencies:
"@patternfly/react-core" "^6.0.0-alpha.36"

"@patternfly/patternfly-a11y@4.3.1":
version "4.3.1"
resolved "https://registry.yarnpkg.com/@patternfly/patternfly-a11y/-/patternfly-a11y-4.3.1.tgz#09f050d3a899a60471519f552d64ecaaeb5fec2f"
Expand Down