-
Notifications
You must be signed in to change notification settings - Fork 448
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(preview): fix issue sometimes causing hotspot menu to stay a gray box after uploading #8076
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 16, 2024 6:11 PM (UTC) ❌ Failed Tests (2) -- expand for details
|
⚡️ Editor Performance ReportUpdated Mon, 16 Dec 2024 18:31:18 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
@@ -104,7 +104,7 @@ export function createObserveFields(options: { | |||
mergeMap((result) => { | |||
return concat( | |||
observableOf(result), | |||
result === undefined // hack: if we get undefined as result here it can be because the document has | |||
result === null // hack: if we get null as result here it can be because the document has |
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.
The null
is coming from here (which never returns undefined
, causing the issue in the first place):
reprojected[resultIdx] = found || null |
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.
This makes sense to me, with one clarifying question: there's no reason to retry, if I understand correctly? We can expect a non-null value to emit after a null value if, indeed, that is the case?
thank you for the review @cngonzalez!
Correct! The listener already have retrying built in, so it will does it best to always stay connected as long as it has 1 or more subscribers.
Normally yes – technically you can get null and then null either because:
|
… box after uploading (#8076)
Description
Occationally after uploading an image, the hotspot and crop icons remains greyed out forever.
Traced this down to being caused by us returning
null
from the batch fetcher we use to fetch previewed documents, in combination with a subsequent check forundefined
to check if we need to refetch after document creations as a safeguard against initial indexing taking some time.What to review
Commits can be reviewed one-by-one.
as any
castsTesting
A bit involved to add unit test for this particular case as it is highly dependent on backend index latency, but will do some follow improvements and see if I can include some unit tests with those.
Notes for release