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(core): compute open state on focus with shouldPanelOpen #456

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

francoischalifour
Copy link
Member

Description

This improves the experience when using openOnFocus on slow networks. The panel only opens when shouldPanelOpen returns true.

The default implementation for shouldPanelOpen is to return true when there are some items. As a result, the panel won't open on focus as long as there's no results. This means that the panel won't open with empty content.

Preview

Before

ac-onFocus-without-shouldPanelOpen

After

ac-onFocus-with-shouldPanelOpen

@Shipow
Copy link
Contributor

Shipow commented Feb 19, 2021

solid improvement

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Cool addition!

@francoischalifour francoischalifour merged commit dd28098 into next Feb 19, 2021
@francoischalifour francoischalifour deleted the fix/onFocus-with-shouldPanelOpen branch February 19, 2021 10:44
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.

3 participants