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

feat: preserve visited documents in documents-store [WIP] #7537

Closed
wants to merge 3 commits into from

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Sep 23, 2024

Description

This PR adds the ability to listen to the last N visited documents, allowing us to render them immediately when you open the form instead of having to wait for it to be fully loaded again.
It works for the following case:

  • User navigates to document foo (Shows loading state)
  • User navigates to document bar (Shows loading state)
  • User navigates back to document foo (Shows document immediately, as it has been visited before)

⚠️ It partially copies necessary changes from corel #7176
⚠️ It modifies the preview store to use mendoza patches.

store.previously.visited.documents.mov

What to review

It modifies the preview store to use mendoza patches, does this requires any other update?
Is something else from corel needed to be moved to this branch for the preview store to work?

Testing

New tests added for the new observable.

Notes for release

Improvements to documents loading, preserving the last 5(confirm number) visited documents so users can see the document before the listener connection is established.

Copy link

vercel bot commented Sep 23, 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 Sep 25, 2024 9:12am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 9:12am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 9:12am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 9:12am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 9:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Sep 25, 2024 9:12am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Component Testing Report Updated Sep 25, 2024 9:16 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 43s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 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) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 41s 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) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 36s 12 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

@pedrobonamin
Copy link
Contributor Author

Canceled and replaced for #7552
This PR introduced the changes using the preview listener to keep the changes alive, we have decided to use a in memory cache instead.

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.

1 participant