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

Automatically trigger autocomplete on focus. #534

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

SiriusXT
Copy link

Automatically trigger autocomplete on focus, which can achieve:

  1. Automatically display suggestions when input is focused, without needing to input any text.
  2. Automatically show recent notes when creating a new tab.

Copy link

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

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

@SiriusXT , although an interesting contribution, there are two downsides to this approach that I can notice:

  1. There is a short blink between adding a new tab and the popup showing.
  2. If there are multiple workspaces, the workspace switcher which resides just under the search bar is completely covered.
    • This means that a user has to press Escape or click outside to hide the popup, resulting in one extra action that needs to be done in order to switch workspaces.
    • I think this one can be mitigated by either moving the workspace switcher above the search box or using a list-based approach for autocompletion (similar to how I implemented the jump-to-note one).
    • The biggest issue is that new users who are not aware that there is a workspace switcher underneath the auto-triggered completion will not discover it easily.

Whilst the first one is not that important, the second one would be a deal-breaker.

@SiriusXT
Copy link
Author

SiriusXT commented Nov 1, 2024

  1. There is a short blink between adding a new tab and the popup showing.

    1. If there are multiple workspaces, the workspace switcher which resides just under the search bar is completely covered.

      • This means that a user has to press Escape or click outside to hide the popup, resulting in one extra action that needs to be done in order to switch workspaces.
      • I think this one can be mitigated by either moving the workspace switcher above the search box or using a list-based approach for autocompletion (similar to how I implemented the jump-to-note one).
      • The biggest issue is that new users who are not aware that there is a workspace switcher underneath the auto-triggered completion will not discover it easily.

Whilst the first one is not that important, the second one would be a deal-breaker.

  1. Placing noteAutocompleteService.showRecentNotes(this.$autoComplete); inside doRender doesn’t seem to cause flickering.
  2. Has been modified to always display autocompletion. And move the workspace above the search input.

@eliandoran eliandoran merged commit eb05c5b into develop Nov 1, 2024
1 check passed
@eliandoran eliandoran deleted the AutomaticallyShowRecentNotes branch November 1, 2024 18:37
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.

2 participants