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: mf-5994 check if ValueRef is ready #11296

Merged
merged 1 commit into from Jan 19, 2024
Merged

Conversation

UncleBill
Copy link
Contributor

@UncleBill UncleBill added this to the 2.25.0 milestone Jan 17, 2024
@@ -34,7 +34,16 @@ useActivatedPluginsSiteAdaptor.visibility = {
}

export function useIsMinimalMode(pluginID: string) {
return useValueRef(minimalModeSub).includes(pluginID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need this change? useValueRef already handles readyPromise.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@UncleBill UncleBill changed the title fix: mf-5994 defer minimal mode after the subscription ready fix: mf-5994 check if ValueRef is ready Jan 18, 2024
@Jack-Works Jack-Works merged commit 615e877 into develop Jan 19, 2024
16 checks passed
@Jack-Works Jack-Works deleted the fix/mf-5994-minimal-mode branch January 19, 2024 09:45
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.

None yet

2 participants