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: prevent flash of "Untitled" when loading a document w/ preview #7505

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

ryanbonial
Copy link
Member

Description

This PR fixes the quick flash of a Document's title as "Untitled" if the document has a preview (e.g. the movie database template) by adding a ready check before showing the Document pane.

What to review

Verify that there is not a case where we should show the Document pane, but the Document is not ready.

Testing

  1. npm create sanity@latest
  2. Choose the movie database template, typescript
  3. npm run dev
  4. Visit http://localhost:3333/structure/movie and click on the various movies in the list. You should no longer seewill see "Untitled" flash as their title.

Notes for release

@ryanbonial ryanbonial requested a review from a team as a code owner September 13, 2024 22:20
@ryanbonial ryanbonial requested review from rexxars and removed request for a team September 13, 2024 22:20
Copy link

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

@ryanbonial ryanbonial self-assigned this Sep 13, 2024
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Sep 13, 2024

Component Testing Report Updated Sep 17, 2024 11:14 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 44s 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 43s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 17s 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) 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

@ryanbonial ryanbonial added this pull request to the merge queue Sep 18, 2024
Merged via the queue into next with commit b7f0135 Sep 18, 2024
42 checks passed
@ryanbonial ryanbonial deleted the fix/SDX-1395 branch September 18, 2024 17:15
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.

2 participants