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: mf-5994 check if ValueRef is ready #11296
Conversation
@@ -34,7 +34,16 @@ useActivatedPluginsSiteAdaptor.visibility = { | |||
} | |||
|
|||
export function useIsMinimalMode(pluginID: string) { | |||
return useValueRef(minimalModeSub).includes(pluginID) |
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.
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 result was false
by default, that's arbitrary.
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.
@Jack-Works Any other questions?
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 use(ref.readyPromise)
should suspend the render, you should not get a "default" value before the readyPromise
is resolved.
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.
if (!ref2.nowReady) use(ref2.readyPromise)
Should be
if (!ref2.ready) use(ref2.readyPromise)
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.
nice catch
3c18c39
to
f65ef7e
Compare
https://mask.atlassian.net/browse/MF-5994