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

Restore icons page #2889

Merged
merged 21 commits into from
Apr 2, 2025
Merged

Conversation

hannahiss
Copy link
Member

@hannahiss hannahiss commented Mar 12, 2025

Related issues

#2887

Description

  • Restore the documentation for icons in extend/icons
  • Move the size helper documentation into this page to propose a complete documentation about icons, and change links to this part
  • Adapt links and buttons documentation pages to refer properly to internal icon doc (before pointing to solaris icons finder). For buttons, move the paragraph up to be common to "text and icon" and "icon only"
  • Remove unused icons inside grid system example
  • Add escape_svg on our background CSS example as we advise developers to do :-)
  • Add heart-recommend.svg to make an example of external image with an SVG
  • Restore all icons directly from SVG sprite downloaded from solaris icons finder (which removed the commas)

Motivation & Context

During beta user tests, we saw than icons documentation is needed. Now that we know that we will still use the Solaris icons library, we can restore the page.

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

Copy link

netlify bot commented Mar 12, 2025

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 44045da
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/67ecfa0640ef760008041040
😎 Deploy Preview https://deploy-preview-2889--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hannahiss hannahiss marked this pull request as ready for review March 14, 2025 16:10
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a link to uncoment in the button page.
All oran.ge/icons should probably be replaced by {{< param icons >}}.
icon-link.md page should be dropped since it's no more in sidebar.yml.
Helpers > Icon entry should be removed from the sidebar.yml

The following color utilities and CSS variables are intended for use only with functional icons, not with text, and icons should not be used on their own, but only alongside text, as functional colors do not provide sufficient contrast to ensure readability.

{{< example >}}
<div class="d-flex justify-content-center gap-md-tall">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you raised earlier, it's very hard to understand design choices about not making them accessible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand the why of these choices of non-accessible icon colors, what can we do ?


### Other icons

Here are some examples of other [color utilities]({{< docsref "utilities/colors#colors" >}}) and CSS variables used with icons.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a table like the one above ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could, but I don't have the context of usage...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this could be an improvement for the future, let's not close it but feel free not to fill it in this PR.

Copy link
Contributor

@Aniort Aniort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two points to see...

The following color utilities and CSS variables are intended for use only with functional icons, not with text, and icons should not be used on their own, but only alongside text, as functional colors do not provide sufficient contrast to ensure readability.

{{< example >}}
<div class="d-flex justify-content-center gap-md-tall">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand the why of these choices of non-accessible icon colors, what can we do ?

- CSS background images are intended to be decorative

#### Informative/meaningful icons
If the icon is **meaningful**, e.g. only content of a button, you have to provide an appropriate alternative text: for example, the description of the icon or the description of the action triggered. The best way to do this is to keep the icon hidden to assistive technologies (see above) and add a visually hidden label (which will be perceived by assistive technologies) by using the `.visually-hidden` class. For external images, you can also fill the `alt` attribute directly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My adding for these last sentences:
The best way to do this is to keep the icon hidden to assistive technologies (see above) and add a visually hidden label (which will be perceived by assistive technologies) by using the .visually-hidden class. For external images, you can also fill in the alt attribute directly. Instead of these two techniques, you can also use an aria-label in the button tag to provide an accessible name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@vprothais vprothais requested a review from Copilot March 21, 2025 11:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restores and updates documentation for icons in the project by consolidating icon usage instructions and references across several pages. Key changes include:

  • Updating the buttons, links, typography, and text documentation to reference the new icon size utilities and SVG sprite guidelines.
  • Adjusting the sidebar to remove draft flags for icon-related pages.
  • Removing the obsolete icon-link helper documentation.

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
site/content/docs/0.2/components/buttons.md Updated icon usage instructions in buttons with an informative callout.
site/content/docs/0.2/components/links.md Revised icon usage guidance in links and improved accessibility recommendations.
site/content/docs/0.2/utilities/text.md Updated reference from icon helper to icon size utilities.
site/content/docs/0.2/content/typography.md Consistent update of icon helper reference to icon size utilities.
site/data/sidebar.yml Removed draft flags to make the Icons documentation live.
site/content/docs/0.2/utilities/colors.md Simplified icon-related color utility guidance by linking to the proper icons documentation.
site/content/docs/0.2/helpers/icon-link.md Removed obsolete icon-link helper documentation.
Files not reviewed (2)
  • site/assets/scss/_component-examples.scss: Language not supported
  • site/content/docs/0.2/examples/grid-system/index.html: Language not supported
Comments suppressed due to low confidence (2)

site/content/docs/0.2/helpers/icon-link.md:1

  • The file icon-link.md has been completely removed. Please confirm that all references to the icon-link helper have been updated or removed to avoid broken documentation links.
----

site/data/sidebar.yml:217

  • Ensure that the removal of the 'draft: true' flag for the Icons page is intentional, so the Icons documentation appears correctly in the sidebar.
-      draft: true


### Other icons

Here are some examples of other [color utilities]({{< docsref "utilities/colors#colors" >}}) and CSS variables used with icons.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this could be an improvement for the future, let's not close it but feel free not to fill it in this PR.

<button type="button" class="btn btn-icon btn-default" aria-label="Open settings">
<span class="icon si si-settings" aria-hidden="true"></span>
</button>
<img src="/docs/{{< param docs_version >}}/assets/img/heart-recommend.svg" alt="Favorite" width="32" height="32">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that normal to have it here ? It feels weird to have it, I couldn't spot it in dark mode at the first glance.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@louismaximepiton, I find it logical to have an example with an image since we talk about the alt attribute. Maybe we should use another icon color that could work on white and dark background ?

…nd-icons-page

# Conflicts:
#	site/content/docs/0.3/helpers/icon-link.md
#	site/content/docs/0.3/helpers/icon.md
#	site/static/docs/0.3/assets/img/heart-recommend.svg
@louismaximepiton louismaximepiton linked an issue Mar 25, 2025 that may be closed by this pull request
2 tasks
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 more small changes and we're good to go

<path d="M500 75.5c-234.72 0-425 190.28-425 425s190.28 425 425 425 425-190.28 425-425-190.28-425-425-425Zm0 100a75 75 0 1 1-75 75 75 75 0 0 1 75-75Zm125 600H400v-25.737l5.287-.167c15.555-.5 27.115-4.919 34.368-13.136 2.576-2.972 6.956-13.1 6.956-47.153v-227.2c0-32.392-4.523-44.6-8.311-49.141-5.359-6.391-16.516-10.147-33.17-11.156l-5.13-.31v-26h175v313.807c0 32.415 8.457 44.618 12.24 49.142 5.34 6.389 15.68 10.142 32.625 11.152l5.135.3v25.6Z" style="fill-rule:evenodd"/>
</symbol>
<symbol id="tick-confirmation" fill="currentColor" viewBox="0 0 1000 1000">
<symbol fill="currentColor" viewBox="0 0 1000 1000" id="tick-confirmation">
<path d="M500 75C265.279 75 75 265.279 75 500s190.279 425 425 425 425-190.279 425-425S734.721 75 500 75Zm222.051 264.988-254.642 320-.007-.006a39.635 39.635 0 0 1-62.125 0l-.006.005-127.321-160 .006-.006a40.142 40.142 0 0 1 2.928-53.267l15.915-16a39.612 39.612 0 0 1 54.022-2.077l.006-.008L428.382 515 663.77 285.818l.006.008A39.734 39.734 0 0 1 730.77 315a39.952 39.952 0 0 1-8.726 24.981Z" style="fill-rule:evenodd"/>
</symbol>
<symbol id="vector" viewBox="0 0 46 48" fill="currentColor">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<symbol id="vector" viewBox="0 0 46 48" fill="currentColor">
<symbol fill="currentColor" viewBox="0 0 46 48" id="vector">

@vprothais vprothais added this to the OUDS milestone Apr 1, 2025
@vprothais vprothais added the 📖 documentation Improvements or additions to documentation label Apr 1, 2025
@vprothais vprothais merged commit eccc477 into ouds/main Apr 2, 2025
11 checks passed
@vprothais vprothais deleted the ouds/main-2887-docs-add-extend-icons-page branch April 2, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation
Projects
Development

Successfully merging this pull request may close these issues.

[OUDS] docs: add 'Extend > Icons' page
4 participants