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(core): version document's history was returning error #7438

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Aug 29, 2024

Description

https://www.loom.com/share/b1e04c690f7b45dcb40d153cf055c97b?sid=6a600c40-cf41-4bc3-ad0c-d0b90bba4414

What to review

  1. The first commit includes the fix for this issue - 5cff65b
  2. The second is a refactor. The intention behind this renaming of publishedId to documentId, is to give affordance that in cases where the document is a version, then publishedId is a misnomer. It was really this line: this.draftId = isVersionId(documentId) ? documentId : drafts.${documentId}`` where it felt incorrect to refer to publishedId
  3. A further refactor in Timeline to use versionId to reference a version Id and a canonical draft

Testing

N/A

Notes for release

N/A

Copy link

vercel bot commented Aug 29, 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 30, 2024 2:50pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 2:50pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 2:50pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 2:50pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 2:50pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 30, 2024 2:50pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 29, 2024

Component Testing Report Updated Aug 30, 2024 2:54 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 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 48s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 18s 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) 19s 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

@RitaDias
Copy link
Contributor

Also, not sure what but @jordanl17 seems that the Extract, Transform and Load CI is failing consistently on this PR (I've tried re-running it a couple of times) 🤔

@@ -147,7 +149,7 @@ export class Timeline {
id: event.id,
author: event.author,
timestamp: event.timestamp,
draftEffect: event.effects[this.draftId],
draftEffect: event.effects[this.versionId],
Copy link
Member

Choose a reason for hiding this comment

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

did you consider renaming draftEffect to versionEffect?

Copy link
Member Author

Choose a reason for hiding this comment

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

I briefly did, but worried it would have too big a footprint. However just looked at it again and draftEffect's use is quite limited, so I've made this improvement. Thanks

Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Seems to work nicely for me. Nice fix! 🥳

@jordanl17 jordanl17 merged commit 2f39edb into corel Aug 30, 2024
40 of 42 checks passed
@jordanl17 jordanl17 deleted the corel-115-version-docs-history-error branch August 30, 2024 15:03
juice49 pushed a commit that referenced this pull request Sep 3, 2024
* fix: draftId correct set in timeline for version docs

* refactor: timeline uses documentId rather than publishedId for agnostic use with versions

* refactor(core): defining versionId rather than draftId

* refactor(core): refactor to better reflect use of version nomenclature in history

* fix(core): resolving tsdoc issue with destructure

* fix(core): resolving tsdoc issue with destructure
RitaDias pushed a commit that referenced this pull request Oct 3, 2024
* fix: draftId correct set in timeline for version docs

* refactor: timeline uses documentId rather than publishedId for agnostic use with versions

* refactor(core): defining versionId rather than draftId

* refactor(core): refactor to better reflect use of version nomenclature in history

* fix(core): resolving tsdoc issue with destructure

* fix(core): resolving tsdoc issue with destructure
juice49 pushed a commit that referenced this pull request Oct 4, 2024
* fix: draftId correct set in timeline for version docs

* refactor: timeline uses documentId rather than publishedId for agnostic use with versions

* refactor(core): defining versionId rather than draftId

* refactor(core): refactor to better reflect use of version nomenclature in history

* fix(core): resolving tsdoc issue with destructure

* fix(core): resolving tsdoc issue with destructure
juice49 pushed a commit that referenced this pull request Oct 7, 2024
* fix: draftId correct set in timeline for version docs

* refactor: timeline uses documentId rather than publishedId for agnostic use with versions

* refactor(core): defining versionId rather than draftId

* refactor(core): refactor to better reflect use of version nomenclature in history

* fix(core): resolving tsdoc issue with destructure

* fix(core): resolving tsdoc issue with destructure
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.

4 participants