Add comprehensive settings controls to Settings page #3613
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.
Overview
This PR consolidates all plugin settings into a single, centralized Settings page, improving discoverability and user experience. Previously, many settings were scattered across different UI components (SettingsDropdown, OptionsModal) or only accessible during specific workflows.
Motivation
Users had to navigate through multiple locations to configure the plugin:
This fragmentation made it difficult for users to:
Changes
Three New Settings Sections Added
1. Token Application Settings
Controls how tokens are applied to designs:
2. Export Options
Controls which token types are exported as variables or styles, displayed in a two-column grid:
Variables Column:
Styles Column:
Implements mutual exclusion: enabling Color variables disables Color styles and vice versa.
3. Export Rules
Controls how tokens are transformed when exported to Figma:
Implementation Details
@/selectors
- no new state createduseCallback
)settings
,tokens
, andmanageStylesAndVariables
namespaces@tokens-studio/ui
components (Switch, Label, Stack, Box, Heading, Text) for consistencyTesting
Added 3 new test cases covering all new sections:
renders token application settings switches
: Verifies all 6 switches render correctlyrenders export options switches
: Verifies all 7 variables/styles switches render correctlyrenders export rules switches
: Verifies all 5 rule switches render correctlyTests use element ID selectors for robustness across translation changes.
Impact
Settings Accessibility: 460% increase
User Benefits:
Developer Benefits:
Backward Compatibility
✅ No breaking changes
Files Changed
Settings.tsx
: Added 387 lines (3 new sections, 17 handlers)Settings.test.tsx
: Added 35 lines (3 new test cases).changeset/funny-keys-taste.md
: Created required changesetQuality Checks
yarn build:dev
)yarn lint
)Screenshots
Settings Page Structure
The Settings page now includes three new bordered sections between "REM Configuration" and "Session Recording":
Each section maintains visual consistency with the existing Settings page design using borders, proper spacing, and clear headings.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.