Skip to content
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

docs(health-index): swapping PNGs with SVGs #1659

Merged
merged 39 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
88c37e4
Adding rh-health-index element
markcaron May 2, 2024
6947d5d
fix(health-index): lint, change prop to grade
markcaron May 2, 2024
57cb589
fix(health-index): eslint
markcaron May 2, 2024
5df12e0
fix(health-index): correct class name
markcaron May 2, 2024
c3ae3ce
fix(health-index): correct class name
markcaron May 2, 2024
77a46e1
fix(health-index) code docs and screenshot
markcaron May 2, 2024
4bb5592
docs(health-index): add overview
markcaron May 2, 2024
e4bc33a
Merge branch 'staging/charmander' into feat/health-index
adamjohnson May 9, 2024
5828f21
Merge branch 'staging/charmander' into feat/health-index
adamjohnson May 13, 2024
f8b577c
Update elements/rh-health-index/demo/color-context.html
markcaron Jun 6, 2024
9f3106d
fix(health-index): added changeset, a11y test, changed template, read…
markcaron Jun 6, 2024
7cd4b97
Merge branch 'feat/health-index' of github.com:RedHat-UX/red-hat-desi…
markcaron Jun 6, 2024
6ebc9ce
fix(health-index): Adding/fixing a11y tests
markcaron Jun 6, 2024
0c5ee90
chore(health-index): linting
markcaron Jun 6, 2024
44fec15
chore(health-index): linting again
markcaron Jun 6, 2024
18700c9
refactor(health-index): fix colors, refactor CSS vars
markcaron Jun 10, 2024
d31bdaf
perf(health-index): reduce bundle and DOM size
bennypowers Jun 11, 2024
e09b8d8
fix(health-index): colours and linting
bennypowers Jun 11, 2024
5f342c5
Merge branch 'staging/charmander' into feat/health-index
bennypowers Jun 11, 2024
4aed0f6
feat(health-index): meter role
bennypowers Jun 13, 2024
c6f9571
Merge branch 'staging/charmander' into feat/health-index
bennypowers Jun 13, 2024
495ab43
Merge branch 'staging/charmander' into feat/health-index
bennypowers Jun 16, 2024
e02d5bd
fix(health-index): voiceover
bennypowers Jun 17, 2024
210d5b0
docs(health-index): format demos
bennypowers Jun 17, 2024
637f545
fix(health-index): screen readers
bennypowers Jun 17, 2024
b6629fd
fix(health-index): role
bennypowers Jun 17, 2024
2a76da0
docs(health-index): sr demos
bennypowers Jun 17, 2024
87e0b3f
perf: remove superfluous attribute prop
bennypowers Jun 18, 2024
9306ae5
Merge branch 'staging/charmander' into feat/health-index
bennypowers Jun 18, 2024
dae4ef6
docs: update .changeset/calm-fireants-kneel.md
bennypowers Jun 18, 2024
db0a328
docs(health-index): correct shortcodes for code page
zeroedin Jun 18, 2024
800b934
docs(health-index): adding images
markcaron Jun 18, 2024
be52271
chore: remove errant commite files
zeroedin Jun 18, 2024
278b2aa
docs(health-index): adding repoStatus, relateItems, and style docs
markcaron Jun 18, 2024
94208a2
Merge branch 'feat/health-index' of github.com:RedHat-UX/red-hat-desi…
markcaron Jun 18, 2024
1ea86dd
Merge branch 'staging/charmander' into feat/health-index
bennypowers Jun 19, 2024
94a1bf5
feat(health-index): adding and updating docs pages, adding a11y guide…
markcaron Jun 20, 2024
17f4cf7
docs(health-index): swapping PNGs for SVGs
markcaron Jun 24, 2024
afda2f4
Merge branch 'staging/charmander' into feat/health-index
markcaron Jun 24, 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
3 changes: 1 addition & 2 deletions elements/rh-health-index/docs/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ tagName | getElementDescription }}

<uxdot-example width-adjustment="752px">
<img src="{{ './overview.png' | url }}" alt="Four health index components. One is green with letter grade A, one is yellow with letter grade C, one is orange with letter grade D, and one is red with letter grade F.">
<img src="{{ './overview.svg' | url }}" alt="Four health index components. One is green with letter grade A, one is yellow with letter grade C, one is orange with letter grade D, and one is red with letter grade F.">
</uxdot-example>


Expand Down Expand Up @@ -32,4 +32,3 @@ View a live version of this component and see how it can be customized.


{% repoStatusChecklist %}

26 changes: 13 additions & 13 deletions elements/rh-health-index/docs/10-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Health index is a combination of letter grades and severity colors. Severity col

<figure>
<uxdot-example width-adjustment="752px">
<img src="{{ '../style-anatomy.png' | url }}" alt="Anatomy of 3 health index components. Annotation #1 is pointing to the letter grade and annotation #2 is pointing to the severity level.">
<img src="{{ '../style-anatomy.svg' | url }}" alt="Anatomy of 3 health index components. Annotation #1 is pointing to the letter grade and annotation #2 is pointing to the severity level.">
</uxdot-example>
<figcaption>
<ol>
Expand All @@ -34,7 +34,7 @@ Health index is a combination of letter grades and severity colors. Severity col
There are four available variants: `Small`, `Default`, `Large`, and `Extra large`. The only difference between the Large and Extra large variants is the size.

<uxdot-example width-adjustment="752px">
<img src="{{ '../style-variants.png' | url }}" alt="4 columns of health index components. Each column is a different size. Under each column, there is every letter grade and severity color.">
<img src="{{ '../style-variants.svg' | url }}" alt="4 columns of health index components. Each column is a different size. Under each column, there is every letter grade and severity color.">
</uxdot-example>


Expand All @@ -45,30 +45,30 @@ Health index is available in both light and dark themes.
### Light theme

<uxdot-example width-adjustment="752px">
<img src="{{ '../style-theme-light.png' | url }}" alt="Light theme health index component examples.">
<img src="{{ '../style-theme-light.svg' | url }}" alt="Light theme health index component examples.">
</uxdot-example>

<uxdot-example color-palette="lighter" width-adjustment="752px">
<img src="{{ '../style-theme-light.png' | url }}" alt="Light theme health index component examples.">
<img src="{{ '../style-theme-light.svg' | url }}" alt="Light theme health index component examples.">
</uxdot-example>

<uxdot-example color-palette="light" width-adjustment="752px">
<img src="{{ '../style-theme-light.png' | url }}" alt="Light theme health index component examples.">
<img src="{{ '../style-theme-light.svg' | url }}" alt="Light theme health index component examples.">
</uxdot-example>


### Dark theme

<uxdot-example color-palette="dark" width-adjustment="752px">
<img src="{{ '../style-theme-dark.png' | url }}" alt="Dark theme health index component examples.">
<img src="{{ '../style-theme-dark.svg' | url }}" alt="Dark theme health index component examples.">
</uxdot-example>

<uxdot-example color-palette="darker" width-adjustment="752px">
<img src="{{ '../style-theme-dark.png' | url }}" alt="Dark theme health index component examples.">
<img src="{{ '../style-theme-dark.svg' | url }}" alt="Dark theme health index component examples.">
</uxdot-example>

<uxdot-example color-palette="darkest" width-adjustment="752px">
<img src="{{ '../style-theme-dark.png' | url }}" alt="Dark theme health index component examples.">
<img src="{{ '../style-theme-dark.svg' | url }}" alt="Dark theme health index component examples.">
</uxdot-example>


Expand All @@ -77,7 +77,7 @@ Health index is available in both light and dark themes.
Squares in the Default, Large, and Extra large variants are aligned horizontally.

<uxdot-example width-adjustment="752px">
<img src="{{ '../style-configuration.png' | url }}" alt="3 examples of health index component configurations. The small size is just 1 square, so it’s horizontally and vertically centered. The default, large, and extra large sizes are rows of squares, so they’re horizontally centered only.">
<img src="{{ '../style-configuration.svg' | url }}" alt="3 examples of health index component configurations. The small size is just 1 square, so it’s horizontally and vertically centered. The default, large, and extra large sizes are rows of squares, so they’re horizontally centered only.">
</uxdot-example>


Expand All @@ -86,7 +86,7 @@ Squares in the Default, Large, and Extra large variants are aligned horizontally
The spacer in the Default variant is the same for all viewport sizes.

<uxdot-example width-adjustment="240px">
<img src="{{ '../style-space.png' | url }}" alt="Health index component with a 16px spacer box in between a C letter grade and a row of severity squares. The active severity square is yellow.">
<img src="{{ '../style-space.svg' | url }}" alt="Health index component with a 16px spacer box in between a C letter grade and a row of severity squares. The active severity square is yellow.">
</uxdot-example>


Expand All @@ -97,7 +97,7 @@ The spacer in the Default variant is the same for all viewport sizes.
Depending on the theme and chosen variant, each severity level can have different colors and font styling.

<uxdot-example width-adjustment="752px">
<img src="{{ '../style-severity-level-light.png' | url }}" alt="Multiple light theme health index components at different sizes. Annotations 1 through 4 are pointing to various styling details as well as letter grades that have been enlarged.">
<img src="{{ '../style-severity-level-light.svg' | url }}" alt="Multiple light theme health index components at different sizes. Annotations 1 through 4 are pointing to various styling details as well as letter grades that have been enlarged.">
</uxdot-example>

<rh-table>
Expand Down Expand Up @@ -162,7 +162,7 @@ Depending on the theme and chosen variant, each severity level can have differen


<uxdot-example color-palette="darkest" width-adjustment="752px">
<img src="{{ '../style-severity-level-dark.png' | url }}" alt="Multiple dark theme health index components at different sizes. Annotations 1 through 4 are pointing to various styling details as well as letter grades that have been enlarged..">
<img src="{{ '../style-severity-level-dark.svg' | url }}" alt="Multiple dark theme health index components at different sizes. Annotations 1 through 4 are pointing to various styling details as well as letter grades that have been enlarged..">
</uxdot-example>

<rh-table>
Expand Down Expand Up @@ -228,4 +228,4 @@ Depending on the theme and chosen variant, each severity level can have differen

## Interactive

Health index includes only text and is not interactive.
Health index includes only text and is not interactive.
22 changes: 11 additions & 11 deletions elements/rh-health-index/docs/20-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ There are four available variants: `Small`, `Default`, `Large`, and `Extra large


<uxdot-example width-adjustment="752px">
<img src="{{ '../guidelines-variants.png' | url }}" alt="A row of health index components with emphasis descriptions under each size. Small is low, default is medium, large is high, and extra large is highest.">
<img src="{{ '../guidelines-variants.svg' | url }}" alt="A row of health index components with emphasis descriptions under each size. Small is low, default is medium, large is high, and extra large is highest.">
</uxdot-example>

<rh-table>
Expand Down Expand Up @@ -70,7 +70,7 @@ When health index shows a grade of “A” and the severity level color is green


<uxdot-example width-adjustment="640px">
<img src="{{ '../guidelines-severity-levels.png' | url }}" alt="A 3 by 3 grid of small size health index components. Each row has letter grades A, C, and F. Under each letter grade is text that describes a safe, at risk, or vulnerable state.">
<img src="{{ '../guidelines-severity-levels.svg' | url }}" alt="A 3 by 3 grid of small size health index components. Each row has letter grades A, C, and F. Under each letter grade is text that describes a safe, at risk, or vulnerable state.">
</uxdot-example>


Expand All @@ -89,7 +89,7 @@ Health index should always be placed near helpful text or other content that exp
Health index can be stacked with other content. In such cases, we recommend using the Small variant, as it does not take focus away from surrounding information.

<uxdot-example width-adjustment="120px">
<img src="{{ '../guidelines-layout-stacked.png' | url }}" alt="A small size health index component with a letter grade A at the bottom of a stack of text.">
<img src="{{ '../guidelines-layout-stacked.svg' | url }}" alt="A small size health index component with a letter grade A at the bottom of a stack of text.">
</uxdot-example>


Expand All @@ -98,7 +98,7 @@ Health index can be stacked with other content. In such cases, we recommend usin
Health index can also be inserted inline with text and components. In such cases, we recommend using the Large or Extra large variants to maintain equal hierarchy among elements.

<uxdot-example width-adjustment="752px">
<img src="{{ '../guidelines-layout-inline.png' | url }}" alt="An extra large size health index component with a letter grade F in between a heading, body text, and a call to action.">
<img src="{{ '../guidelines-layout-inline.svg' | url }}" alt="An extra large size health index component with a letter grade F in between a heading, body text, and a call to action.">
</uxdot-example>


Expand All @@ -111,14 +111,14 @@ Letter grades and severity level colors are designed to work together. Mixing th
<div class="grid sm-two-columns">
<uxdot-best-practice do>
<uxdot-example color-palette="lightest" width-adjustment="176px" slot="image">
<img src="{{ '../guidelines-best-practice-1-do.png' | url }}" alt="Small, default, and large size health index components displaying correct letter grades and severity colors.">
<img src="{{ '../guidelines-best-practice-1-do.svg' | url }}" alt="Small, default, and large size health index components displaying correct letter grades and severity colors.">
</uxdot-example>
<p>Keep letter grades and severity level colors consistent.</p>
</uxdot-best-practice>

<uxdot-best-practice dont>
<uxdot-example color-palette="lightest" width-adjustment="176px" slot="image">
<img src="{{ '../guidelines-best-practice-1-dont.png' | url }}" alt="Small, default, and large size health index components displaying incorrect letter grades and severity colors.">
<img src="{{ '../guidelines-best-practice-1-dont.svg' | url }}" alt="Small, default, and large size health index components displaying incorrect letter grades and severity colors.">
</uxdot-example>
<p>Do not mix up letter grades and severity level colors.</p>
</uxdot-best-practice>
Expand All @@ -132,14 +132,14 @@ Light theme components are designed only to work in the light theme, and dark th
<div class="grid sm-two-columns">
<uxdot-best-practice do>
<uxdot-example color-palette="darkest" width-adjustment="176px" slot="image">
<img src="{{ '../guidelines-best-practice-2-do.png' | url }}" alt="Dark theme small, default, and large size health index components.">
<img src="{{ '../guidelines-best-practice-2-do.svg' | url }}" alt="Dark theme small, default, and large size health index components.">
</uxdot-example>
<p>Use the correct components in the correct theme.</p>
</uxdot-best-practice>

<uxdot-best-practice dont>
<uxdot-example color-palette="darkest" width-adjustment="176px" slot="image">
<img src="{{ '../guidelines-best-practice-2-dont.png' | url }}" alt="Light theme small, default, and large size health index components used incorrectly in the dark theme.">
<img src="{{ '../guidelines-best-practice-2-dont.svg' | url }}" alt="Light theme small, default, and large size health index components used incorrectly in the dark theme.">
</uxdot-example>
<p>Do not use components from one theme in another theme.</p>
</uxdot-best-practice>
Expand All @@ -153,15 +153,15 @@ Each variant is unique and designed to meet a specific user need.
<div class="grid sm-two-columns">
<uxdot-best-practice do>
<uxdot-example color-palette="lightest" width-adjustment="176px" slot="image">
<img src="{{ '../guidelines-best-practice-3-do.png' | url }}" alt="Small, default, and large size health index components displaying correct letter grades and severity colors.">
<img src="{{ '../guidelines-best-practice-3-do.svg' | url }}" alt="Small, default, and large size health index components displaying correct letter grades and severity colors.">
</uxdot-example>
<p>Use the available variants as intended.</p>
</uxdot-best-practice>

<uxdot-best-practice dont>
<uxdot-example color-palette="lightest" width-adjustment="278px" slot="image">
<img src="{{ '../guidelines-best-practice-3-dont.png' | url }}" alt="Large size health index component displaying extra text and an incorrect combination of styles.">
<img src="{{ '../guidelines-best-practice-3-dont.svg' | url }}" alt="Large size health index component displaying extra text and an incorrect combination of styles.">
</uxdot-example>
<p>Do not combine variants or add other elements like text.</p>
</uxdot-best-practice>
</div>
</div>
Loading
Loading