Skip to content
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

Fix styling issues post 2.0 release #3098

Merged
merged 14 commits into from
Aug 28, 2024
Merged

Fix styling issues post 2.0 release #3098

merged 14 commits into from
Aug 28, 2024

Conversation

akshay-gupta7
Copy link
Contributor

@akshay-gupta7 akshay-gupta7 commented Aug 22, 2024

Addresses #3088 - the themes that are now selected in the styles export modal shall be exported as styles.
Resolves #3083 - the 2nd point when multiple themes are enabled, then the styles don't show in Figma

Description

  • When we select the themes in the export modal to be exported as styles, the expectation now would be to export those themes regardless of their active/inactive status.
  • When multiple themes are enabled, especially core/global, figma ceased to display the corresponding style token applied. This PR should address that

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • None of the above

How to test this

1st Issue:

  • Create some themes in the plugin.
  • Keep them inactive.
  • Go to Export Styles&Variables, choose the themes you wish to be exported as styles
  • They should be exported irrespective of them being inactive

2nd Issue:

  • Create some themes, along with a core/global theme
  • Apply light/dark theme, theme switching should work fine, along with the correct styles being applied(and displayed on Figma) without core theme enabled
  • As soon you apply core theme, the theme switching should work fine between light/dark or any other themes, along with the pertinent styles being showed in Figma

Screenshots or video (if necessary):

Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 54421e5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tokens-studio/figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 22, 2024

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

Copy link
Contributor

github-actions bot commented Aug 22, 2024

Commit SHA:0c52d26a0360250841e906e2d37d6ed270ad72df

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: fix-styling-issues 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 67.92 (0) 58.55 (0.01) 64.56 (0) 68.34 (0.02)
🟢 packages/tokens-studio-for-figma/src/app/store/useTokens.tsx 54.91 (0.25) 36.66 (0) 55.38 (0) 56.03 (0.53)
🟢 packages/tokens-studio-for-figma/src/plugin/TokenValueRetriever.ts 88.88 (0) 85.1 (0.66) 100 (0) 93.18 (0)
🟢 packages/tokens-studio-for-figma/src/plugin/updateStyles.ts 93.75 (0) 84.37 (0) 100 (0) 96 (0.17)

Copy link
Contributor

github-actions bot commented Aug 22, 2024

Commit SHA:ab26ad51e6e84820f66c2b9cce3fadeecc85821b
Current PR reduces the test coverage percentage by 1 for some tests

@akshay-gupta7 akshay-gupta7 self-assigned this Aug 22, 2024
@akshay-gupta7 akshay-gupta7 changed the title Fix styling issues Fix styling issues post 2.0 release Aug 22, 2024
@akshay-gupta7 akshay-gupta7 linked an issue Aug 22, 2024 that may be closed by this pull request
@rbosker
Copy link
Collaborator

rbosker commented Aug 26, 2024

these fixes work for me upon testing

@akshay-gupta7 akshay-gupta7 marked this pull request as ready for review August 27, 2024 08:04
Copy link
Contributor

@cuserox cuserox left a comment

Choose a reason for hiding this comment

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

Seems to fix the original issues ✨

@akshay-gupta7 akshay-gupta7 merged commit 2dc668c into main Aug 28, 2024
10 checks passed
@akshay-gupta7 akshay-gupta7 deleted the fix-styling-issues branch August 28, 2024 07:33
@akshay-gupta7 akshay-gupta7 restored the fix-styling-issues branch August 28, 2024 13:07
@moerthgeorg
Copy link

Thank you so much! Just tested it and it works for me again now. Great work!

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

Successfully merging this pull request may close these issues.

Prefix with theme name working vs not working Styles Issues after 2.0 release
5 participants