-
Notifications
You must be signed in to change notification settings - Fork 432
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: delays rendering the Start in Create banner until document is ready #8020
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Dec 12, 2024 9:05 AM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Thu, 12 Dec 2024 09:10:48 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a report that the Start in Create banner was breifly flashing (appearing and disappearing for < 500ms) on localhost. I was unable to reproduce that issue, but noticed that when running on 3G Network, the Create banner will render whilst the document is loading.
I am able to repro this flashing banner issue in test studio locally (with throttled network), though I can confirm this fix addresses that issue too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
* next: (49 commits) fix: delays rendering the Start in Create banner until document is ready (#8020) fix(deps): update dependency @sanity/ui to ^2.10.9 (#8009) chore(deps): dedupe pnpm-lock.yaml (#8023) test(playwright-ct): fix issues and flake (#8016) feat(cli): misc copy changes (#8003) feat(cli): remove is-builtin-module (#6579) v3.67.1 chore(deps): bump minimum requirement of @sanity/import and @sanity/export (#8012) chore(deps): update dependency @sanity/pkg-utils to v6.12.0 (#8010) fix(core): tasks UpdatedTimeAgo should be a hook (#8011) v3.67.0 chore(prettier): fix unformatted files 🤖 ✨ (#8006) chore: reduce renovate double PR noise fix(deps): update dependency @sanity/ui to ^2.10.7 (#8005) fix(deps): update dependency @sanity/ui to ^2.10.7 (#7998) feat(cli): use `@vercel/frameworks` in `bootstrapRemoteTemplate` (#8001) feat: switch create integration to opt-out flow (#8002) feat: use eslint 9 for new studios (#7978) fix(sanity): optimise getLeafWeights to not stack overflow (#7999) feat(test-studio): enable `groq2024` search strategy ...
Description
Currently, the Start in Create banner will appear when a document pane is loading:
With this fix, the banner should no longer appear when the document pane is in a loading state.
Background
Got a report that the Start in Create banner was breifly flashing (appearing and disappearing for < 500ms) on localhost.
I was unable to reproduce that issue, but noticed that when running on 3G Network, the Create banner will render whilst the document is loading.
This PR delays rendering the banner until the document is ready. Opted for prop-drilling to get the ready state, as not to add any new useDocumentPane calls.
The ready check is done in the wrapper component where appId checks runs; this allows the initial requests to run in parallel with document load, so the data is ready as soon as possible.
What to review
The code ;)
Testing
Notes for release
N/A