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

refactor(sanity): add changes to allow for comments in version documents #7404

Merged
merged 8 commits into from
Aug 27, 2024

Conversation

RitaDias
Copy link
Contributor

@RitaDias RitaDias commented Aug 21, 2024

Description

Added changes to the comments to allow for version comments to show up when the version is switched to.

Screen.Recording.2024-08-26.at.14.22.02.mov

Added a todo for when the release is "complete", tested out the readOnly and it looks to do what we want. The rest will depend on design

Copy link

vercel bot commented Aug 21, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 9:21am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 9:21am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 9:21am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 9:21am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 9:21am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 9:21am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 21, 2024

Component Testing Report Updated Aug 27, 2024 9:19 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 47s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 37s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 47s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 17s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@@ -84,7 +83,7 @@ export function useCommentsStore(opts: CommentsStoreOptions): CommentsStoreRetur
const handleListenerEvent = useCallback(
async (event: ListenEvent<Record<string, CommentDocument>>) => {
// Fetch all comments on initial connection
if (event.type === 'welcome' && !didInitialFetch.current) {
if (event.type === 'welcome') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed to remove it in order for the comments to be refetched on switching perspectives in a document

Screen.Recording.2024-08-26.at.13.42.37.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, let's discuss in slack

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you ping the other reviewers when you come to a conclusion on this? 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll be making this change 🔜

@RitaDias RitaDias requested a review from a team as a code owner August 27, 2024 09:01
Copy link
Contributor

@pedrobonamin pedrobonamin left a comment

Choose a reason for hiding this comment

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

Thanks @RitaDias , looks good to me !

@RitaDias RitaDias removed the request for review from a team August 27, 2024 09:07
@RitaDias RitaDias merged commit 4b54e7a into corel Aug 27, 2024
43 checks passed
@RitaDias RitaDias deleted the corel-101-2 branch August 27, 2024 09:50
juice49 pushed a commit that referenced this pull request Sep 3, 2024
…nts (#7404)

* refactor(sanity): add changes to allow for comments in version documents

* refactor(sanity): send version via prop to commentsListItemLayout

* docs(sanity): add comments for todo for readonly

* refactor(sanity): fix comments

* refactor(sanity): reverts changes to the potential ui for the future

* chore(sanity): remove "comments support" comment

* refactor(sanity): rename document ids and revert change in CommentsProvider for useEditState

* refactor(sanity): refactor solution for re-rendering panes when switching between versions
RitaDias added a commit that referenced this pull request Oct 3, 2024
…nts (#7404)

* refactor(sanity): add changes to allow for comments in version documents

* refactor(sanity): send version via prop to commentsListItemLayout

* docs(sanity): add comments for todo for readonly

* refactor(sanity): fix comments

* refactor(sanity): reverts changes to the potential ui for the future

* chore(sanity): remove "comments support" comment

* refactor(sanity): rename document ids and revert change in CommentsProvider for useEditState

* refactor(sanity): refactor solution for re-rendering panes when switching between versions
juice49 pushed a commit that referenced this pull request Oct 4, 2024
…nts (#7404)

* refactor(sanity): add changes to allow for comments in version documents

* refactor(sanity): send version via prop to commentsListItemLayout

* docs(sanity): add comments for todo for readonly

* refactor(sanity): fix comments

* refactor(sanity): reverts changes to the potential ui for the future

* chore(sanity): remove "comments support" comment

* refactor(sanity): rename document ids and revert change in CommentsProvider for useEditState

* refactor(sanity): refactor solution for re-rendering panes when switching between versions
juice49 pushed a commit that referenced this pull request Oct 7, 2024
…nts (#7404)

* refactor(sanity): add changes to allow for comments in version documents

* refactor(sanity): send version via prop to commentsListItemLayout

* docs(sanity): add comments for todo for readonly

* refactor(sanity): fix comments

* refactor(sanity): reverts changes to the potential ui for the future

* chore(sanity): remove "comments support" comment

* refactor(sanity): rename document ids and revert change in CommentsProvider for useEditState

* refactor(sanity): refactor solution for re-rendering panes when switching between versions
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.

3 participants