Skip to content

feat(lib): Add AI Button#3529

Open
louismaximepiton wants to merge 4 commits intoouds/mainfrom
ouds/main-lmp-add-ai-button
Open

feat(lib): Add AI Button#3529
louismaximepiton wants to merge 4 commits intoouds/mainfrom
ouds/main-lmp-add-ai-button

Conversation

@louismaximepiton
Copy link
Copy Markdown
Member

@louismaximepiton louismaximepiton commented Apr 21, 2026

Types of change

  • Non-breaking change
  • Breaking change (fix or feature that would change existing functionality and usage)

Related issues

Closes #3522

Context & Motivation

Read #3522

Description

Add some CSS and documentation to handle AI Button.

Checklists

  • I have read the contributing guidelines
  • My change follows the developer guide
  • My change pass all tests
  • My change is compatible with a responsive display
  • I have added tests (Javascript unit test or visual) to cover my changes
  • My change introduces changes to the documentation that I have updated accordingly
    • Title and DOM structure is correct
    • Links have been updated (title changes impact links)
    • CSS for the documentation
  • I have checked all states and combinations of the component with my change
  • I have checked all the impacts for the other components and core behavior (grid, reboot, utilities)

Checklist (for Core Team only)

  • The changes need to be in the migration guide
  • The changes are well displayed in Storybook (be careful if example order has changed for DSM)
  • The changes are compatible with RTL
  • Manually test browser compatibility with BrowserStack (Chrome 120, Firefox 121, Edge 120, Safari 15.6, iOS Safari, Chrome & Firefox on Android)

Progression (for Core Team only)

Live previews

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 771700f
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/69e8a9acd8bae000083c343f
😎 Deploy Preview https://deploy-preview-3529--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 project configuration.

@louismaximepiton louismaximepiton linked an issue Apr 21, 2026 that may be closed by this pull request
@louismaximepiton louismaximepiton marked this pull request as ready for review April 22, 2026 10:15
Copilot AI review requested due to automatic review settings April 22, 2026 10:15
@boosted-bot boosted-bot moved this from In Progress / Draft to Need Dev Review in 🟣 [Orange-Boosted-Bootstrap] PRs Board Apr 22, 2026
Copy link
Copy Markdown

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

Adds “AI button” support by introducing new sparkles icons in the docs sprite(s), adding documentation examples, and defining theme tokens/CSS needed to style the component.

Changes:

  • Added sparkles-default / sparkles-colored symbols to the docs SVG sprites (sosh/orange/orange-compact).
  • Added an “AI button” section and metadata to the Buttons documentation page.
  • Introduced AI-button border color tokens (per theme) and CSS for AI button styling.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
site/static/sosh/docs/[version]/assets/img/ouds-web-sprite.svg Adds sparkles symbols for the sosh docs sprite.
site/static/orange/docs/[version]/assets/img/ouds-web-sprite.svg Adds sparkles symbols (including a multi-color variant) for the orange docs sprite.
site/static/orange-compact/docs/[version]/assets/img/ouds-web-sprite.svg Adds sparkles symbols (including a multi-color variant) for the orange-compact docs sprite.
site/src/content/docs/components/buttons.mdx Adds AI button type + documentation examples for AI buttons.
scss/_buttons.scss Adds AI button styling (gradient border + icon swapping).
packages/sosh/scss/tokens/_component.scss Adds manually-defined AI button border tokens for sosh.
packages/sosh/scss/tokens/_component-colors-custom-props.scss Adds a new custom prop used by the sosh AI border token.
packages/orange/scss/tokens/_component.scss Adds manually-defined AI button border tokens for orange.
packages/orange-compact/scss/tokens/_component.scss Adds manually-defined AI button border tokens for orange-compact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scss/_buttons.scss Outdated
Comment thread site/src/content/docs/components/buttons.mdx
Comment thread site/src/content/docs/components/buttons.mdx Outdated
Comment thread site/src/content/docs/components/buttons.mdx Outdated
Comment thread scss/_buttons.scss Outdated
Copy link
Copy Markdown

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

Copilot reviewed 13 out of 16 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/sosh/scss/tokens/_composite.scss Outdated
Comment thread scss/_buttons.scss
Comment thread scss/_buttons.scss Outdated
Comment thread scss/_buttons.scss
Comment thread site/src/content/docs/components/buttons.mdx Outdated
Comment thread site/src/content/docs/components/buttons.mdx
Copy link
Copy Markdown
Collaborator

@MaxLardenois MaxLardenois left a comment

Choose a reason for hiding this comment

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

Some suggestions
In line with what spec we have for now...


<BrandSpecific brand={['orange', 'orange-compact']}>
<Callout type="warning" title="Colored icon">
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. It will be automatically replaced when not present or when needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is that it?

Suggested change
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. It will be automatically replaced when not present or when needed.
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. If omitted, the default AI icon will be displayed.

</BrandSpecific>

<Callout type="info">
`.btn-default` isn't transparent here, and you might specify `--bs-btn-bg` to make it transparent if needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
`.btn-default` isn't transparent here, and you might specify `--bs-btn-bg` to make it transparent if needed.
Due to technical limitations, an AI button with`.btn-default` does not have a transparent background. To simulate transparency, set `--bs-btn-bg` to its container background color.


<BrandSpecific brand={['orange', 'orange-compact']}>
<Callout type="warning" title="Colored icon">
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. It will be automatically replaced when not present or when needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is that it?

Suggested change
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. It will be automatically replaced when not present or when needed.
Be aware that `.btn-strong` and `.btn-minimal` variants should use a colored icon to indicate the AI action. If omitted, the default AI icon will be displayed.

</BrandSpecific>

<Callout type="info">
`.btn-default` isn't transparent here, and you might specify `--bs-btn-bg` to make it transparent if needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
`.btn-default` isn't transparent here, and you might specify `--bs-btn-bg` to make it transparent if needed.
Due to technical limitations, an AI button with`.btn-default` does not have a transparent background. To simulate transparency, set `--bs-btn-bg` to its container background color.


#### Disabled

AI buttons use a `<button>` element, simply add the `disabled` boolean attribute to it. Disabled AI buttons have `pointer-events: none` applied to, preventing hover and active states from triggering.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
AI buttons use a `<button>` element, simply add the `disabled` boolean attribute to it. Disabled AI buttons have `pointer-events: none` applied to, preventing hover and active states from triggering.
AI buttons typically use the `<button>` element. To disable an AI button, add the `disabled` boolean attribute. Disabled AI buttons have `pointer-events: none` applied to, preventing hover and active states from triggering.

---

## v1.3.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<hr />


#### AI button

- <span class="tag tag-small tag-positive"><span class="tag-status-icon"></span>New</span> AI button has been implemented. Read more in our [buttons page]([[docsref:/components/buttons#ai-button]]).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be draft for now?

Comment thread scss/_buttons.scss
}

// No transparency on the button
.btn-default.btn-ai:where(:not(:active, [class*="loading-"], :disabled, [aria-disabled="true"], .btn-on-colored-bg)) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is the :where necessary here?

@boosted-bot boosted-bot moved this from Need Dev Review to Dev Review In Progress in 🟣 [Orange-Boosted-Bootstrap] PRs Board Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚛️ component css 📖 documentation Improvements or additions to documentation 🧰 library

Projects

Status: Dev Review In Progress

Development

Successfully merging this pull request may close these issues.

[OUDS][Components] Create component AI Button

4 participants