figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Feat/chunk set loading

Open SorsOps opened this issue 9 months ago • 5 comments

Why does this PR exist?

Fixes the issue with the Tokens Studio storage provider which needs to chunk requests to get additional token sets

What does this pull request do?

Changes the current graphql requests to get the first page of the tokens then load the remaining pages in parallel

Testing this change

Adds a testing file for this

Additional Notes (if any)

SorsOps avatar Apr 14 '25 12:04 SorsOps

⚠️ No Changeset found

Latest commit: 1eb666706f57759c99af47f0f03c24b798148c16

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

changeset-bot[bot] avatar Apr 14 '25 12:04 changeset-bot[bot]

Commit SHA:12ce2aa5bc961bb1820b2e5bfebb8989aa4ffabd

Test coverage results :test_tube:

Code coverage diff between base branch:main and head branch: feat/chunk-set-loading 
Status File % Stmts % Branch % Funcs % Lines
:red_circle: total 67.1 (-0.02) 58.07 (0.02) 63.83 (-0.03) 67.46 (-0.01)
:red_circle: packages/tokens-studio-for-figma/src/app/components/StorageItemForm/TokensStudioForm.tsx 1.72 (-0.03) 0 (0) 0 (0) 2 (-0.04)
:green_circle: packages/tokens-studio-for-figma/src/storage/TokensStudioTokenStorage.ts 54.38 (4.38) 35.13 (3.19) 60 (5.46) 55.08 (4.46)
:sparkles: :new: packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/getTokenSetsQuery.ts 100 100 100 100
:red_circle: packages/tokens-studio-for-figma/src/storage/tokensStudio/utils/compositionFields.ts 0 (-100) 100 (0) 0 (-100) 0 (-100)
:x: ~~packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/createTokenMutation.ts~~ ~~100~~ ~~100~~ ~~100~~ ~~100~~
:x: ~~packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/deleteTokenMutation.ts~~ ~~100~~ ~~100~~ ~~100~~ ~~100~~
:x: ~~packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/getTokenSetQuery.ts~~ ~~100~~ ~~100~~ ~~100~~ ~~100~~
:x: ~~packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/tokenFragment.ts~~ ~~100~~ ~~100~~ ~~100~~ ~~100~~
:x: ~~packages/tokens-studio-for-figma/src/storage/tokensStudio/graphql/updateTokenMutation.ts~~ ~~100~~ ~~100~~ ~~100~~ ~~100~~

github-actions[bot] avatar Apr 14 '25 13:04 github-actions[bot]

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

github-actions[bot] avatar Apr 14 '25 13:04 github-actions[bot]

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

github-actions[bot] avatar Apr 14 '25 13:04 github-actions[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Apr 14 '25 19:04 sonarqubecloud[bot]