-
Notifications
You must be signed in to change notification settings - Fork 943
800 add gradient variants to UI library button #22692
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
Conversation
…iants-to-ui-library-button
Pull Request Test Coverage Report for Build f5708935df1c39bbe1b43037349b813ff21487a3Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this 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 migrates AI-related button variants from the ai-frontend package to the ui-library for reusability, replacing custom gradient button implementations with standardized variants.
Key changes:
- Adds
ai-primaryandai-secondarybutton variants to the UI library with gradient styling - Introduces a reusable
SparklesIconcomponent with gradient support - Replaces custom CSS classes and
GradientButtoncomponent usage with new standardized variants
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-library/src/elements/button/style.css | Adds CSS styles for ai-primary and ai-secondary button variants with gradient backgrounds and borders |
| packages/ui-library/src/elements/button/stories.js | Adds ai-primary and ai-secondary variants to Storybook examples |
| packages/ui-library/src/elements/button/spark-icon.js | Creates new SparklesIcon component with gradient color support |
| packages/ui-library/src/elements/button/index.js | Integrates SparklesIcon into Button component and adds variant mappings |
| packages/ui-library/src/elements/button/docs/variants.md | Documents the new AI button variants and their usage guidelines |
| packages/ui-library/src/elements/badge/style.css | Updates AI badge to use new gradient color variable |
| packages/tailwindcss-preset/index.js | Adds ai-100, ai-300, ai-500, and ai-600 gradient background utilities |
| packages/js/src/introductions/components/modals/ai-brand-insights-pre-launch.js | Migrates from custom button styling to ai-primary variant |
| packages/js/src/introductions/components/modals/ai-brand-insights-post-launch.js | Migrates from custom button styling to ai-primary variant |
| packages/js/src/ai-generator/components/upsell-modal-content.js | Replaces GradientButton with ai-secondary variant |
| packages/js/src/ai-generator/components/app.js | Replaces GradientButton with ai-secondary variant |
| css/src/introductions.css | Removes custom AI button CSS now handled by ui-library |
| css/src/ai-generator.css | Removes custom SVG margin styles |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .yst-button--ai-secondary { | ||
| @apply yst-bg-transparent yst-relative yst-text-slate-800 yst-ps-2 yst-gap-1.5; | ||
|
|
||
| border-image: linear-gradient(to bottom right, #cd82ab, #a5b4fc) 1; |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded gradient colors duplicate values from the tailwindcss-preset ai-300 gradient. Consider referencing the Tailwind gradient or using CSS custom properties for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is tricky because ai-300 is only used for backgroundImage not borderImage. Border image css is not supported by tailwindcss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the variables in the tailwind config.
JorPV
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 🚀 I left some suggestion comments 🙂
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
AT + CR ✅ |
Context
GradientButtoninai-frontendis not a pattern.Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
_yoast_wpseo_introductionsFor DEVS
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes Add gradient variants to ui library button