-
Notifications
You must be signed in to change notification settings - Fork 52
Don't export new high contrast modes #1245
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 implements selective Figma export functionality for color themes by adding an exportToFigma
flag to each theme configuration. The change prevents high-contrast accessibility variants from being exported to Figma while maintaining their availability for other build processes.
- Added
exportToFigma
boolean property to all theme configurations - Modified the Figma build script to filter themes based on the new flag
- Set high-contrast themes to
exportToFigma: false
and all other themes totrue
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
scripts/themes.config.ts | Added exportToFigma property to all theme configurations, setting high-contrast variants to false |
scripts/buildFigma.ts | Updated to filter themes based on the new exportToFigma flag before processing |
import {figma} from '../src/platforms/index.js' | ||
import type {ConfigGeneratorOptions} from '../src/types/styleDictionaryConfigGenerator.js' | ||
import {getFallbackTheme} from './utilities/getFallbackTheme.js' | ||
|
||
const buildFigma = async (buildOptions: ConfigGeneratorOptions): Promise<void> => { | ||
const themes = origialThemes.filter(theme => theme.exportToFigma !== false) |
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.
There's a typo in the variable name. 'origialThemes' should be 'originalThemes'.
const themes = origialThemes.filter(theme => theme.exportToFigma !== false) | |
import {themes as originalThemes} from './themes.config.js' | |
import {figma} from '../src/platforms/index.js' | |
import type {ConfigGeneratorOptions} from '../src/types/styleDictionaryConfigGenerator.js' | |
import {getFallbackTheme} from './utilities/getFallbackTheme.js' | |
const buildFigma = async (buildOptions: ConfigGeneratorOptions): Promise<void> => { | |
const themes = originalThemes.filter(theme => theme.exportToFigma !== false) |
Copilot uses AI. Check for mistakes.
Design Token Diff (Figma)
|
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 is really nice, I like how there's a prop so we can quickly change our minds later if we want 😄
This PR make sure that we only export indented color themes for Figma.