Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an “ai” color variant for the Heading component by extending theme variables, styles, props, and documentation.
- Adds
aiTextTopGradientColorandaiTextBottomGradientColorto the component theme - Implements an
aistyle variant using a gradient text background - Updates prop definitions and README to support
color="ai" - Broadens theme color types to
stringand includes new AI gradient variables in shared-types
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-heading/src/Heading/theme.ts | Add aiTextTopGradientColor and aiTextBottomGradientColor |
| packages/ui-heading/src/Heading/styles.ts | Define ai variant with linear-gradient text styling |
| packages/ui-heading/src/Heading/props.ts | Include 'ai' in the color prop union |
| packages/ui-heading/src/Heading/README.md | Document usage example for color="ai" |
| packages/shared-types/src/ComponentThemeVariables.ts | Change several contrast colors to string and add AI variables |
Comments suppressed due to low confidence (2)
packages/ui-heading/src/Heading/props.ts:61
- [nitpick] Add unit tests to cover the new
'ai'color variant, ensuring the prop is accepted and the gradient styling is applied correctly.
| 'ai'
packages/shared-types/src/ComponentThemeVariables.ts:659
- Widening specific contrast color properties to
stringreduces compile-time safety; consider usingColors['contrasts'][keyof Colors['contrasts']]or explicit keys to retain type guarantees.
primaryInverseColor: string
| background: ` | ||
| linear-gradient(to bottom, ${componentTheme.aiTextTopGradientColor} 0%, ${componentTheme.aiTextBottomGradientColor} 100%) text`, | ||
| border: 'solid transparent', | ||
| '-webkit-text-fill-color': 'transparent' |
There was a problem hiding this comment.
Missing background-clip: text (and vendor-prefixed -webkit-background-clip: text) may prevent the gradient from being clipped to the text, causing unexpected backgrounds.
Suggested change
| '-webkit-text-fill-color': 'transparent' | |
| '-webkit-text-fill-color': 'transparent', | |
| '-webkit-background-clip': 'text', | |
| 'background-clip': 'text' |
|
INSTUI-4550
balzss
approved these changes
May 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TEST_PLAN: compare with design documentation
INSTUI-4550