-
Notifications
You must be signed in to change notification settings - Fork 107
feat(ui-text,shared-types): add ai-highlight color #1972
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
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 introduces a new text color variant "ai-highlight" to the UI Text component and updates related types and styles.
- Added new theme colors: aiColor and aiBackgroundColor.
- Updated style definitions and prop types to support the new "ai-highlight" variant.
- Adjusted documentation examples and shared type definitions for color properties.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-text/src/Text/theme.ts | Added aiColor and aiBackgroundColor to the theme |
| packages/ui-text/src/Text/styles.ts | Updated style definitions to include the ai-highlight variant |
| packages/ui-text/src/Text/props.ts | Extended supported color types with ai-highlight |
| packages/ui-text/src/Text/README.md | Updated documentation to showcase the new ai-highlight example |
| packages/shared-types/src/ComponentThemeVariables.ts | Changed color properties types from Colors references to string |
packages/ui-text/src/Text/theme.ts
Outdated
| successColor: colors?.contrasts?.green5782, | ||
| alertColor: colors?.contrasts?.blue5782, | ||
| warningColor: colors?.contrasts?.orange5782, | ||
| aiColor: colors.contrasts?.violet5790, |
Copilot
AI
May 15, 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.
For consistency with the other color properties, consider using the safe navigation operator on 'colors' (i.e. colors?.contrasts?.violet5790) to prevent potential runtime errors if colors is null or undefined.
| aiColor: colors.contrasts?.violet5790, | |
| aiColor: colors?.contrasts?.violet5790, |
| successColor: Colors['contrasts']['green4570'] | ||
| alertColor: Colors['contrasts']['blue4570'] | ||
| warningColor: Colors['contrasts']['orange5782'] | ||
| primaryInverseColor: string |
Copilot
AI
May 15, 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.
Changing the color properties from specific Colors references to a generic string type could reduce type safety. Consider maintaining the original color type definitions or adding validation to ensure consistency in the color values.
|
TEST_PLAN: compare with design documentation
INSTUI-4547