Skip to content

Semantic Copilot Theme #34805

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

Open
wants to merge 8 commits into
base: extended-tokens
Choose a base branch
from

Conversation

mltejera
Copy link
Contributor

@mltejera mltejera commented Jul 8, 2025

Created a new package & theme, following Kumo theme pattern.
Visually inspected button components and updated border radii to match Copilot Theme (as defined by the FAI implementation)
Checkout semanticStyleHooks.ts for more notes.

Notes:

  • tokens in code are camel case, while tokens in browser are snake case. This adds friction is finding tokens between the two.
  • In semantic theme, square avatars all point to the same token, ctrlAvatarCornerGroupRaw, so there is no differentiation on size. This will not match Copilot Theme where larger square avatars have larger radii and smaller square avatars will appear circular.
image
  • Being able to hover over a token and see the full fallback mapping is a HUGE dev ex win.
    image
  • TreeItemLayout has a token to control the focus rect, but I did not see one to control focus back plate (which copilot theme wants to change)

Overall thoughts:
Copilot's Theme only changes border radii and a few paddings to accommodate the different radii. However, it also creates new ones (though these new ones were only used in FAI components, not FUI components, which feels smelly to me)

borderRadius2XL: '12px',
borderRadius3XL: '16px',
borderRadius4XL: '24px',
borderRadius5XL: '40px',

There were some places where copilot theme took small, medium and large variants of components and unified their border radii to 8px. So changing the 3 radii token values to 8px just 'happened' to work in these instances (button and text area). However I do think there will be other components that will need to maintain the smaller or larger radii to 'work' (avatar, tag, tooltip, card) and we may have lost the fidelity to do so.

Said more simply, this token implementation inherently and strictly enforces relationships from the original design language which may not/should not exist in other design languages.

Copy link
Member

@chrisdholt chrisdholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mltejera - @davatron5000 let's make sure we get the naming/semantics correct here.

Copy link

github-actions bot commented Jul 8, 2025

Pull request demo site: URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants