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

High-latency provider script #23

Open
tanin47 opened this issue Feb 2, 2020 · 0 comments
Open

High-latency provider script #23

tanin47 opened this issue Feb 2, 2020 · 0 comments
Milestone

Comments

@tanin47
Copy link
Owner

tanin47 commented Feb 2, 2020

Problem

A real-world use case is a provider script that invokes https://dictionaryapi.com/ to get a meaning for a word.

The provider script might take a few seconds or more. Our tooltip should signal user about this delay by showing the loading icon.

Considerations

  • How would it work with the current provider script that is instantaneous?

Design

The provider script returns the first result with the param hasMore:

{
  "items": [{"type": "text", "value": "instant item"}],
  "hasMore": true
}

When hasMore is true, Tip will show the items and the loading icon to user and wait for additional stdout.

This mechanism is endless if hasMore keeps being true.

When hasMore is false, the provider script should end after printing the JSON.

Tip will not end the provider script process.

Additional mechanism

  • Tip should support timing out. Maybe we set it to 30 seconds.
@tanin47 tanin47 added this to the 1.3.0 milestone Feb 9, 2020
@tanin47 tanin47 modified the milestones: 2.0, 3.0 May 29, 2020
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

No branches or pull requests

1 participant