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: add design callouts in all the documentation when incompatibility with ODS #1614

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b8a48d8
Add design callout messages everywhere needed
isabellechanclou Nov 9, 2022
fda5e4e
Add link on the callout title to go to the explanation of the presenc…
isabellechanclou Nov 9, 2022
fee6364
Fix the lineheight of callout text.
isabellechanclou Nov 10, 2022
867e9a5
Add design callout message in Customize/Color
isabellechanclou Nov 10, 2022
aa70535
Fix Buttons design callout message.
isabellechanclou Nov 10, 2022
798f1f3
Add design callout message in Button/Sizes custom size variant
isabellechanclou Nov 10, 2022
4a1d317
Add missing callout message in Docs>Components>Badge
isabellechanclou Nov 14, 2022
350c3f9
Fix word spelling
isabellechanclou Nov 14, 2022
8b84244
Fix link in a callout message for Badge component
isabellechanclou Nov 14, 2022
0bfbb44
Fix list-group/#numbered callout message
isabellechanclou Nov 14, 2022
2112c38
Fix Badges design callout messages after review
isabellechanclou Nov 25, 2022
3f3bd2a
Fix Breadcrumb design callout messages after review
isabellechanclou Nov 25, 2022
33fc463
Fix Button-group design callout messages after review
isabellechanclou Nov 25, 2022
ab28cf2
Remove h4 tag from design callout title
isabellechanclou Nov 28, 2022
885c070
Fix Buttons design callout messages + Add a design callout message in…
isabellechanclou Nov 28, 2022
0736e55
Fix Dropdowns design callout messages after review
isabellechanclou Nov 29, 2022
dea2716
Fix Modals design callout messages after review
isabellechanclou Nov 29, 2022
34a7060
Fix Carousel design callout messages after review
isabellechanclou Nov 29, 2022
c9426ab
Fix Progress design callout messages after review
isabellechanclou Nov 29, 2022
3c5232c
Fix Tooltip design callout messages after review
isabellechanclou Nov 29, 2022
cd0cf7b
Fix Reboot design callout messages after review
isabellechanclou Nov 29, 2022
fa4be81
Fix Color design callout messages after review
isabellechanclou Nov 29, 2022
2ce1f27
Fix Form control design callout messages after review
isabellechanclou Dec 2, 2022
f455984
Fix Input-group design callout messages after review
isabellechanclou Dec 2, 2022
c55605e
Fix Form/Layout design callout messages after review
isabellechanclou Dec 2, 2022
f3706df
Fix Form/Overview design callout messages after review
isabellechanclou Dec 5, 2022
13a9d53
Fix Form/Select design callout messages after review
isabellechanclou Dec 5, 2022
6a087c2
Fix Form/Validation design callout messages after review
isabellechanclou Dec 5, 2022
8cd8a84
Fix Introduction design callout messages after review
isabellechanclou Dec 5, 2022
ea144cf
Fix Breadcrumb design callout messages after review
isabellechanclou Dec 5, 2022
eb3cc22
Fix Button-group design callout messages after review
isabellechanclou Dec 5, 2022
5e33f1b
Fix Carousel design callout messages after review
isabellechanclou Dec 5, 2022
eac00f1
Fix Buttons design callout messages after review
isabellechanclou Dec 5, 2022
5472045
Fix Colors design callout messages after review
isabellechanclou Dec 5, 2022
bc01e55
Fix Dropdowns design callout messages after review
isabellechanclou Dec 5, 2022
39193ea
Fix Form control design callout messages after review
isabellechanclou Dec 5, 2022
de8fc8f
Fix Input group design callout messages after review
isabellechanclou Dec 5, 2022
7a4e7e4
Fix Introduction design callout messages after review
isabellechanclou Dec 5, 2022
74a336e
Fix Form/Overview design callout messages after review
isabellechanclou Dec 6, 2022
b819d38
Fix Modal design callout messages after review
isabellechanclou Dec 6, 2022
f9b896e
Fix Badge design callout messages after review
isabellechanclou Dec 7, 2022
2e9b718
Fix Progress design callout messages after review
isabellechanclou Dec 7, 2022
b19eb41
Fix Tooltips design callout messages after review
isabellechanclou Dec 7, 2022
5d3b634
Fix Form/Select design callout messages after review
isabellechanclou Dec 7, 2022
776708e
Fix Form/Validation design callout messages after review
isabellechanclou Dec 7, 2022
4480ba8
Fix Collapse design callout messages after review
isabellechanclou Dec 8, 2022
20e6a3a
Fix Nav-tabs design callout messages after review
isabellechanclou Dec 8, 2022
512eca4
Fix List-group design callout messages after review
isabellechanclou Dec 8, 2022
8c550e9
Fix design callout messages after review
isabellechanclou Dec 15, 2022
2443926
Fix design callout messages after review
isabellechanclou Dec 16, 2022
d59bb75
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Dec 16, 2022
e396a16
Merge branch 'main' into main-ic-add-design-callouts-in-docs
julien-deramond Dec 22, 2022
15c1a80
Drop Boosted mod comments
julien-deramond Dec 22, 2022
f8936ce
Fix design callout messages after dev and design review
isabellechanclou Feb 2, 2023
244f780
Update site/content/docs/5.2/forms/form-control.md
isabellechanclou Mar 10, 2023
7298b38
Update site/content/docs/5.2/forms/input-group.md
isabellechanclou Mar 10, 2023
a72a977
Fix design callout messages after dev and design review
isabellechanclou Mar 10, 2023
0be5ae2
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Mar 13, 2023
651d6ed
Merge remote-tracking branch 'origin/main-ic-add-design-callouts-in-d…
isabellechanclou Mar 14, 2023
454457a
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Mar 14, 2023
83942cc
Replace {{< ods-incompatibility-alert >}} by {{< design-callout-alert…
isabellechanclou Mar 14, 2023
28b2ce7
Add design callout messages in Spinner component
isabellechanclou Mar 14, 2023
fda225f
Adding and fixing design callout messages for input fieds of 30px height
isabellechanclou Mar 15, 2023
62c76a4
Fixing more design callout messages
isabellechanclou Mar 16, 2023
7b7c035
Merge branch 'main' into main-ic-add-design-callouts-in-docs for havi…
isabellechanclou Mar 20, 2023
ed643d8
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Mar 27, 2023
de08a1c
Fixes
isabellechanclou Apr 13, 2023
57faa2d
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Apr 13, 2023
36716cf
Merge branch 'main' into main-ic-add-design-callouts-in-docs
isabellechanclou Apr 17, 2023
5632d11
Merge branch 'main' into main-ic-add-design-callouts-in-docs
louismaximepiton Jan 4, 2024
4fcd51d
Proposal
louismaximepiton Jan 8, 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
20 changes: 20 additions & 0 deletions site/content/docs/5.3/components/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Badges scale to match the size of the immediate parent element by using relative

### Headings

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This component variant should not be used because it does not exist in the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand All @@ -26,11 +29,15 @@ This component variant should not be used because it does not exist in the Orang
<h5>Example heading <span class="badge text-bg-secondary">New</span></h5>
<h6>Example heading <span class="badge text-bg-secondary">New</span></h6>
{{< /example >}}
</details>

### Buttons

Badges can be used as part of links or buttons to provide a counter.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This component should not be used because it does not exist in the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand All @@ -44,13 +51,17 @@ This component should not be used because it does not exist in the Orange Design
Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.

Unless the context is clear (as with the "Notifications" example, where it is understood that the "4" is the number of notifications), consider including additional context with a visually hidden piece of additional text.
</details>

### Positioned

<!-- Boosted mod: replace the button with a link with an icon because notifiers are only authorized with icons -->

Use utilities to modify a `.badge` and position it in the corner of a link with an icon.

<details class="mb-2">
<summary>See Bootstrap's variants that can be useful in some contexts</summary>
<br>
{{< design-callout-alert >}}
This component variant should be used **only** inside a header component.

Expand All @@ -73,11 +84,15 @@ Please refer to our Boosted [Navbars]({{< docsref "/examples/navbars" >}}) examp
<!-- The example without a count is dropped because not existing in the UI kit -->

<!-- End mod -->
</details>

## Background colors

{{< added-in "5.2.0" >}}

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
These component variants should not be used because they do not exist in the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand All @@ -94,11 +109,15 @@ Set a `background-color` with contrasting foreground `color` with [our `.text-bg
{{< callout info >}}
{{< partial "callouts/warning-color-assistive-technologies.md" >}}
{{< /callout >}}
</details>

## Pill badges

Use the `.rounded-pill` utility class to make badges more rounded with a larger `border-radius`.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This component should not be used because it does not exist in the Orange Design System specifications.

Expand All @@ -111,6 +130,7 @@ Instead, consider using our Boosted [Tags]({{< docsref "/components/tags" >}}).
<span class="badge rounded-pill text-bg-{{ .name }}">{{ .name | title }}</span>{{- end -}}
{{< /badge.inline >}}
{{< /example >}}
</details>

## CSS

Expand Down
4 changes: 4 additions & 0 deletions site/content/docs/5.3/components/breadcrumb.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ $breadcrumb-divider: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/

You can also remove the divider setting `--bs-breadcrumb-divider: '';` (empty strings in CSS custom properties counts as a value), or setting the Sass variable to `$breadcrumb-divider: none;`.

<details class="mb-2">
<summary>Other variants from Bootstrap</summary>
<br>
{{< design-callout-alert >}}
This variant **without the breadcrumb dividers** should not be used because it does not respect the Orange Design System specifications.

Expand All @@ -94,6 +97,7 @@ Please refer to the [Local Headers/Breadcrumb](https://system.design.orange.com/
```scss
$breadcrumb-divider: none;
```
</details>

<!-- Boosted mod: Dark variant -->
## Dark variant
Expand Down
42 changes: 40 additions & 2 deletions site/content/docs/5.3/components/button-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ These classes can also be added to groups of links, as an alternative to the [`.

## Mixed styles

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This variant **using and mixing colored button backgrounds** should not be used because it does not respect the Orange Design System specifications. In button groups, you should only use the button variant that uses `.btn .btn-outline-secondary`.

Expand All @@ -49,17 +52,21 @@ Please refer to our Boosted [Buttons]({{< docsref "/components/buttons#examples"
<button type="button" class="btn btn-success">Right</button>
</div>
{{< /example >}}
</details>

<!-- Boosted mod: no outline styles -->

## Checkbox and radio button groups

Combine button-like checkbox and radio [toggle buttons]({{< docsref "/forms/checks-radios" >}}) into a seamless looking button group.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This **checkbox** variant should not be used because it does not respect the Orange Design System specifications.
These **checkbox** and **radio button** variants should not be used because they do not respect the Orange Design System specifications.

From the Orange Design System point of view, checkboxes should be represented like in our Boosted [Checks]({{< docsref "/forms/checks-radios#checks" >}}) component. You can also refer to the [Checkbox](https://system.design.orange.com/0c1af118d/p/88ab5b-forms/b/599459/i/48901789) guidelines on the Orange Design System website.
From the Orange Design System point of view, checkboxes and radio buttons should respectively be represented like in our Boosted [Checks]({{< docsref "/forms/checks-radios#checks" >}}) or [Radios]({{< docsref "/forms/checks-radios#radios" >}}) components. You can also refer to the [Checkbox](https://system.design.orange.com/0c1af118d/p/88ab5b-forms/b/599459/i/48901789) and [Radio button](https://system.design.orange.com/0c1af118d/p/88ab5b-forms/b/599459/i/48901789) guidelines on the Orange Design System website.
{{< /design-callout-alert >}}

{{< example >}}
Expand Down Expand Up @@ -87,11 +94,15 @@ From the Orange Design System point of view, checkboxes should be represented li
<label class="btn btn-toggle" for="btnradio3">Radio 3</label>
</div>
{{< /example >}}
</details>

## Button toolbar

Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This variant should not be used because it does not respect the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand Down Expand Up @@ -144,11 +155,29 @@ Feel free to mix input groups with button groups in your toolbars. Similar to th
</div>
</div>
{{< /example >}}
</details>

## Sizing

Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups.

{{< example >}}
<div class="btn-group" role="group" aria-label="Default button group">
<button type="button" class="btn btn-outline-secondary">Left</button>
<button type="button" class="btn btn-outline-secondary">Middle</button>
<button type="button" class="btn btn-outline-secondary">Right</button>
</div>
{{< /example >}}

<details class="mb-2">
<summary>Other variants from Bootstrap</summary>
<br>
{{< design-callout-alert >}}
The **first size variant (50px height) and the last one (30px height)** should not be used because they do not respect the Orange Design System specifications.

Please refer to the [Toggle buttons](https://system.design.orange.com/0c1af118d/p/59c349-toggle-buttons/b/91bf23) guidelines on the Orange Design System website.
{{< /design-callout-alert >}}

{{< example >}}
<div class="btn-group btn-group-lg" role="group" aria-label="Large button group">
<button type="button" class="btn btn-outline-secondary">Left</button>
Expand All @@ -168,11 +197,15 @@ Instead of applying button sizing classes to every button in a group, just add `
<button type="button" class="btn btn-outline-secondary">Right</button>
</div>
{{< /example >}}
</details>

## Nesting

Place a `.btn-group` within another `.btn-group` when you want dropdown menus mixed with a series of buttons.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
This variant should not be used because it does not respect the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand All @@ -194,11 +227,15 @@ This variant should not be used because it does not respect the Orange Design Sy
</div>
</div>
{{< /example >}}
</details>

## Vertical variation

Make a set of buttons appear vertically stacked rather than horizontally.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
These 3 vertical variants should not be used because they do not respect the Orange Design System specifications.
{{< /design-callout-alert >}}
Expand Down Expand Up @@ -265,3 +302,4 @@ These 3 vertical variants should not be used because they do not respect the Ora
<label class="btn btn-outline-danger" for="vbtn-radio3">Radio 3</label>
</div>
{{< /example >}}
</details>
24 changes: 18 additions & 6 deletions site/content/docs/5.3/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ Fancy larger or smaller buttons? Add `.btn-lg` or `.btn-sm` for additional sizes

You can even roll your own custom sizing with CSS variables:

<details class="mb-2">
<summary>Other variants from Bootstrap</summary>
<br>
{{< design-callout-alert >}}
This variant should not be used because it does not respect the Orange Design System specifications.

Expand All @@ -243,6 +246,7 @@ Please refer to the [Buttons](https://system.design.orange.com/0c1af118d/p/278eb
Custom button
</button>
{{< /example >}}
</details>

## Disabled state

Expand Down Expand Up @@ -280,6 +284,9 @@ To cover cases where you have to keep the `href` attribute on a disabled link, t

Create responsive stacks of full-width, "block buttons" like those in Boosted 4 with a mix of our display and gap utilities. By using utilities instead of button-specific classes, we have much greater control over spacing, alignment, and responsive behaviors.

<details class="mb-2">
<summary>Other variants from Bootstrap</summary>
<br>
{{< design-callout-alert >}}
These **full-width** buttons should not be used on desktop screens because they do not respect the Orange Design System specifications.

Expand All @@ -292,6 +299,7 @@ Please refer to the [Buttons](https://system.design.orange.com/0c1af118d/p/278eb
<button class="btn btn-primary" type="button">Button</button>
</div>
{{< /example >}}
</details>

Here we create a responsive variation, starting with vertically stacked buttons until the `md` breakpoint, where `.d-md-block` replaces the `.d-grid` class, thus nullifying the `gap-2` utility. Resize your browser to see them change.

Expand Down Expand Up @@ -324,12 +332,6 @@ Additional utilities can be used to adjust the alignment of buttons when horizon

The button plugin allows you to create simple on/off toggle buttons.

{{< design-callout-alert >}}
These variants with only **one toggle button** should not be used because they do not respect the Orange Design System specifications. From the Orange Design System point of view and for usability reasons, a toggle button should not be used alone.

Instead, consider using our Boosted [Checks]({{< docsref "/forms/checks-radios#checks" >}}), [Radios]({{< docsref "/forms/checks-radios#radios" >}}) or [Radio toggle buttons]({{< docsref "/forms/checks-radios#radio-toggle-buttons" >}}) components.
{{< /design-callout-alert >}}

{{< callout info >}}
Visually, these toggle buttons are identical to the [checkbox toggle buttons]({{< docsref "/forms/checks-radios#checkbox-toggle-buttons" >}}). However, they are conveyed differently by assistive technologies: the checkbox toggles will be announced by screen readers as "checked"/"not checked" (since, despite their appearance, they are fundamentally still checkboxes), whereas these toggle buttons will be announced as "button"/"button pressed". The choice between these two approaches will depend on the type of toggle you are creating, and whether or not the toggle will make sense to users when announced as a checkbox or as an actual button.
{{< /callout >}}
Expand All @@ -338,6 +340,15 @@ Visually, these toggle buttons are identical to the [checkbox toggle buttons]({{

Add `data-bs-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to ensure that it is conveyed appropriately to assistive technologies.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
These variants with only **one toggle button instead of a group of buttons** should not be used because they do not respect the Orange Design System specifications. From the Orange Design System point of view and for usability reasons, [Toggle buttons](https://system.design.orange.com/0c1af118d/p/59c349-toggle-buttons/b/91bf23) should not be used alone.

Instead, consider using our Boosted [Checks]({{< docsref "/forms/checks-radios#checks" >}}), [Radios]({{< docsref "/forms/checks-radios#radios" >}}) or [Radio toggle buttons]({{< docsref "/forms/checks-radios#radio-toggle-buttons" >}}) components.
{{< /design-callout-alert >}}

{{< example >}}
<button type="button" class="btn btn-primary" data-bs-toggle="button">Toggle button</button>
<button type="button" class="btn btn-primary active" data-bs-toggle="button" aria-pressed="true">Active toggle button</button>
Expand All @@ -349,6 +360,7 @@ Add `data-bs-toggle="button"` to toggle a button's `active` state. If you're pre
<a href="#" class="btn btn-primary active" role="button" data-bs-toggle="button" aria-pressed="true">Active toggle link</a>
<a class="btn btn-primary disabled" aria-disabled="true" role="button" data-bs-toggle="button">Disabled toggle link</a>
{{< /example >}}
</details>

### Methods

Expand Down
4 changes: 4 additions & 0 deletions site/content/docs/5.3/components/carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ Pausing the carousel by hovering one slide should not be used.

You can add captions to your slides with the `.carousel-caption` element within any `.carousel-item`. They can be easily hidden on smaller viewports, as shown below, with optional [display utilities]({{< docsref "/utilities/display" >}}). We hide them initially with `.d-none` and bring them back on medium-sized devices with `.d-md-block`.

<details class="mb-2">
<summary>See Bootstrap's variants</summary>
<br>
{{< design-callout-alert >}}
**Captions** should not be used because they do not respect the Orange Design System specifications.

Expand Down Expand Up @@ -201,6 +204,7 @@ Please refer to the [Carousel navigation](https://system.design.orange.com/0c1af
</button>
</div>
{{< /example >}}
</details>

### Crossfade

Expand Down
Loading