feat(lib): Add AI Button#3529
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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-coloredsymbols 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.
There was a problem hiding this comment.
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.
MaxLardenois
left a comment
There was a problem hiding this comment.
Some suggestions
In line with what spec we have for now...
| } | ||
|
|
||
| // No transparency on the button | ||
| .btn-default.btn-ai:where(:not(:active, [class*="loading-"], :disabled, [aria-disabled="true"], .btn-on-colored-bg)) { |
There was a problem hiding this comment.
Is the :where necessary here?
There was a problem hiding this comment.
Not really, but it might be useful for end-users to avoid adding too much specificty to the selector
There was a problem hiding this comment.
I'm not sure I understand what it adds for users tbh
Co-authored-by: Maxime Lardenois <maxime.lardenois@orange.com>
MaxLardenois
left a comment
There was a problem hiding this comment.
Still a question on :where but I approve as it's not blocking
|
I add a comment to keep track of what is happening. This component has been reworked on design side to make simpler. This PR must be updated with new version of the component, when available. |
Types of change
Related issues
Closes #3522
Context & Motivation
Read #3522
Description
Add some CSS and documentation to handle AI Button.
Checklists
Checklist (for Core Team only)
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews