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

fixes variable resolution #2204

Merged
merged 1 commit into from
Aug 30, 2023
Merged

fixes variable resolution #2204

merged 1 commit into from
Aug 30, 2023

Conversation

six7
Copy link
Collaborator

@six7 six7 commented Aug 30, 2023

fixes an issue where we're not applying variables correctly when the theme had a missing variable reference
plus fixes an issue with wrong color tokens being used in manage themes

@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2023

🦋 Changeset detected

Latest commit: 3bdc1d2

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

@six7 six7 marked this pull request as ready for review August 30, 2023 12:23
@github-actions
Copy link
Contributor

PR Analysis

  • 🎯 Main theme: Fixes variable resolution and color token usage
  • 📝 PR summary: This PR fixes an issue where variables were not being applied correctly when the theme had a missing variable reference. It also addresses a problem with wrong color tokens being used in manage themes.
  • 📌 Type of PR: Bug fix
  • 🧪 Relevant tests added: False

PR Feedback

  • 💡 General suggestions:

    • The changes look good overall, addressing the variable resolution issue and the color token problem. However, it would be helpful to add some comments explaining the purpose of the code changes, especially in the ColorTokenForm.tsx and ResolvingLoader.tsx files.
    • Consider adding error handling for the importVariableByKeyAsync function in the updateNodes function in updateNodes.ts. This will ensure that any errors during variable import are properly handled.
  • 🤖 Code feedback:

    • relevant file: src/app/components/ColorTokenForm.tsx
      suggestion: Consider adding comments to explain the purpose of the code changes.
      relevant line:

How to use

To invoke the PR-Agent, add a comment using one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@github-actions
Copy link
Contributor

Commit SHA:53f2025896eead4e4e9f01792d19988561c013e5

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: fix/variable-resolution 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 68.26 (-0.02) 59.43 (0) 66.43 (0) 68.51 (-0.02)
🔴 src/plugin/updateNodes.ts 39.53 (-2.97) 20 (0) 12.5 (0) 41.46 (-3.27)

@github-actions
Copy link
Contributor

Commit SHA:53f2025896eead4e4e9f01792d19988561c013e5
Current PR reduces the test coverage percentage by 100 for some tests

@six7 six7 merged commit a493af8 into main Aug 30, 2023
5 of 6 checks passed
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.

2 participants