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

2124-show-token-values-in-inspect #2321

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Conversation

robinhoodie0823
Copy link
Contributor

@robinhoodie0823 robinhoodie0823 commented Oct 12, 2023

20231011_202114.mp4

Closes #2124

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2023

🦋 Changeset detected

Latest commit: 414cdb9

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

@github-actions
Copy link
Contributor

PR Analysis

  • 🎯 Main theme: Adding a tooltip to composition token inspect
  • 📝 PR summary: This PR introduces a tooltip to the composition token inspect feature. It also includes some refactoring and updates to the package version.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR involves changes in multiple files and the logic is moderately complex.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR seems to be well-structured and the changes are logically grouped. However, it would be beneficial to add some tests to ensure the new functionality works as expected.

  • 🤖 Code feedback:

    • relevant file: src/app/components/TokenTooltip/TokenTooltipContent.tsx
      suggestion: Remove the console.log statement. It's a good practice to remove debug logs before committing the code. [important]
      relevant line: console.log('token in TokenToolTipContent: ', token);

    • relevant file: src/app/components/InspectorResolvedToken.tsx
      suggestion: Consider extracting the logic inside the TokenTypes.COMPOSITION case into a separate function for better readability and maintainability. [medium]
      relevant line: let compositionToken: SingleToken = {} as SingleToken;

    • relevant file: src/app/components/InspectorTokenSingle.tsx
      suggestion: The useEffect hook is updating a context value directly. It's recommended to use a context provider's value setter function instead of mutating the context value directly. [important]
      relevant line: React.useEffect(() => {

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

github-actions bot commented Oct 12, 2023

Commit SHA:17f8f949a8cd9131ddc371050eebd11af62400dd

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 2124-show-token-values-in-inspect 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 71.01 (0) 61.37 (-0.01) 69.26 (0) 71.26 (0)
🔴 src/app/components/EditTokenForm.tsx 47.75 (-0.31) 28.08 (-0.25) 38.63 (0) 48.53 (-0.32)
🔴 src/plugin/setValuesOnVariable.ts 62.5 (-1.13) 50 (-3.84) 100 (0) 61.29 (-1.21)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2023

Commit SHA:17f8f949a8cd9131ddc371050eebd11af62400dd
Current PR reduces the test coverage percentage by 100 for some tests


type Props = {
name: string;
value: SingleToken['value']
rawValue?: Record<string, string>
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the shape of this is wrong hence why the CI is breaking on build

@SorsOps SorsOps merged commit 02ac59b into main Oct 20, 2023
6 of 7 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.

Show token values in Inspect
2 participants