sanity icon indicating copy to clipboard operation
sanity copied to clipboard

chore(tasks): move CommentsSetupProvider to core

Open pedrobonamin opened this issue 1 year ago • 3 comments

Description

This PR moves the <CommentsSetupProvider> from comments plugin to core. We need to move this provider because tasks and upcoming features will need to use the comments (addon) dataset to store data. In favour of sharing code, this provider is moved to core.

The runSetup function has been refactored to create the client but not create the comment / payload received, allowing for it's reusability.

Naming wise, we are keeping it as CommentsSetupProvider because the dataset has that name, when the dataset rename feature is executed, we could rename this provider and all the related files.

Main changes File moved to core. Function updated to only create the dataset. Caller now creates the document.

What to review

Is the location of the new provider correct?

Testing

Creating a new comments dataset should work.

Notes for release

Moves the CommentSetupProvider into core for reusability.

pedrobonamin avatar Feb 16 '24 11:02 pedrobonamin

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Feb 23, 2024 2:44pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 23, 2024 2:44pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Feb 23, 2024 2:44pm

vercel[bot] avatar Feb 16 '24 11:02 vercel[bot]

Package Documentation Change
sanity +2%

Full Report
sanity
This branch Next branch
180 documented 178 documented
850 not documented 853 not documented
@sanity/migrate
This branch Next branch
17 documented 17 documented
75 not documented 59 not documented
@sanity/diff
This branch Next branch
13 documented 13 documented
16 not documented 16 not documented
@sanity/block-tools
This branch Next branch
4 documented 4 documented
9 not documented 9 not documented
@sanity/types
This branch Next branch
55 documented 55 documented
233 not documented 239 not documented
sanity/desk
This branch Next branch
84 documented 84 documented
64 not documented 64 not documented
@sanity/portable-text-editor
This branch Next branch
21 documented 21 documented
44 not documented 44 not documented
@sanity/mutator
This branch Next branch
7 documented 7 documented
3 not documented 4 not documented
@sanity/cli
This branch Next branch
1 documented 1 documented
31 not documented 31 not documented
sanity/structure
This branch Next branch
2 documented 2 documented
8 not documented 8 not documented
@sanity/util/concurrency-limiter
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
@sanity/util/legacyDateFormat
This branch Next branch
0 documented 0 documented
4 not documented 5 not documented
@sanity/schema/_internal
This branch Next branch
0 documented 0 documented
12 not documented 12 not documented
@sanity/util/paths
This branch Next branch
1 documented 1 documented
15 not documented 15 not documented
sanity/router
This branch Next branch
17 documented 17 documented
26 not documented 26 not documented
@sanity/schema
This branch Next branch
0 documented 0 documented
2 not documented 2 not documented
sanity/cli
This branch Next branch
2 documented 2 documented
0 not documented 0 not documented
@sanity/vision
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/util/fs
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
sanity/_internal
This branch Next branch
0 documented 0 documented
1 not documented 1 not documented
@sanity/util/client
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
@sanity/util/createSafeJsonParser
This branch Next branch
1 documented 1 documented
0 not documented 0 not documented
sanity/_internalBrowser
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/util/content
This branch Next branch
1 documented 1 documented
5 not documented 5 not documented

github-actions[bot] avatar Feb 16 '24 11:02 github-actions[bot]

Component Testing Report Updated Feb 23, 2024 2:47 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 31s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 22s 0 0 3
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 1s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 2s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

github-actions[bot] avatar Feb 16 '24 11:02 github-actions[bot]