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: URL and JSONbin storage #1172

Merged
merged 7 commits into from
Aug 23, 2022

Conversation

LiamMartens
Copy link
Contributor

@LiamMartens LiamMartens commented Aug 16, 2022

Updated URL storage provider to support themes and metadata
Updated JSONbin to support metadata

Fixes #1164

Updated URL storage provider to support themes and metadata
Updated JSONbin to support metadata
@vercel
Copy link

vercel bot commented Aug 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
figma-tokens ✅ Ready (Inspect) Visit Preview Aug 22, 2022 at 3:45PM (UTC)
ft-storybook ✅ Ready (Inspect) Visit Preview Aug 22, 2022 at 3:45PM (UTC)

@LiamMartens
Copy link
Contributor Author

@six7 I did notice JSONBin currently always asks to recover local changes (also in the live plugin), We may want to review this behavior - but it's a bit of a weird one because it's the only provider type we automatically sync as opposed to the git providers. Perhaps there is merit in just aligning the logic altogether and also making this a manual action like the git providers?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2022

Commit SHA:9b334495ac6b8ccd6ae47464831de0a3da3717ff

Test coverage results 🧪

Code coverage diff between base branch:next and head branch: fix/url-storage-and-jsonbin-metadata-and-themes 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 67.64 (0.34) 58.95 (0.41) 64.08 (0.17) 67.82 (0.35)
🟢 src/app/store/providers/jsonbin.tsx 72.22 (17.93) 74.36 (25.79) 83.33 (16.66) 72.86 (18.45)
🟢 src/storage/JSONBinTokenStorage.ts 100 (0) 82.14 (0.89) 100 (0) 100 (0)
🟢 src/storage/RemoteTokenStorage.ts 95.45 (9.09) 78.57 (14.28) 100 (0) 95.45 (9.09)
🟢 src/storage/UrlTokenStorage.ts 100 (14.29) 78.57 (8.57) 100 (20) 100 (14.29)
✨ 🆕 src/utils/date/compareUpdatedAt.ts 71.43 50 100 71.43

@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2022

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

Copy link
Collaborator

@six7 six7 left a comment

Choose a reason for hiding this comment

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

Two version and updatedAt placements

We now have 2 places where we track updatedAt and version, is this intended? I really like placing it in metadata fwiw!

image

image

Other than that this works as intended 🙏 Would love to know the thoughts behind the two version and updatedAt placements

@six7 six7 linked an issue Aug 17, 2022 that may be closed by this pull request
@six7
Copy link
Collaborator

six7 commented Aug 17, 2022

@six7 I did notice JSONBin currently always asks to recover local changes (also in the live plugin), We may want to review this behavior - but it's a bit of a weird one because it's the only provider type we automatically sync as opposed to the git providers. Perhaps there is merit in just aligning the logic altogether and also making this a manual action like the git providers?

Yeah agree, we should align as much as we can, making this a manual pull/push action would be great. I'll create an issue

@LiamMartens
Copy link
Contributor Author

@six7 I updated the PR to move the version and updatedAt keys to the metadata and remove them from the root object. The root object keys are still supported when reading.

@LiamMartens LiamMartens requested a review from six7 August 23, 2022 10:07
@six7 six7 merged commit 7a2db48 into next Aug 23, 2022
@SorsOps SorsOps deleted the fix/url-storage-and-jsonbin-metadata-and-themes branch July 6, 2023 11:57
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.

URL Sync doesn't respect $themes or $metadata
2 participants