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

EXPERIMENTAL: Add a utility for running async visual tasks #841

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

azangru
Copy link
Collaborator

@azangru azangru commented Sep 27, 2022

Description

This PR adds a utility for wrapping potentially long-running functions such that:

  • if the function completes quickly, nothing additional happens
  • if the function takes a while to complete, the wrapper utility sends a signal for showing a loading indicator
  • the wrapper utility will take some (configurable) time before sending a new signal to remove the loading indicator, thus avoiding the undesirable flickering of the loading indicator caused by too brief a time of showing it

This utility function can then be used to create a hook that can be used in individual components that display loading spinners (e.g. in the LoadingButton component); or to send signals to the redux store.

@azangru azangru requested a review from msmanoj September 27, 2022 21:31
@imransl
Copy link
Contributor

imransl commented Oct 6, 2022

@azangru Went through this and like this approach. Can we use this for loading the genome browser as well?

@ridwanamo ridwanamo requested a review from imransl October 12, 2022 08:47
@azangru azangru mentioned this pull request Oct 13, 2022
@azangru azangru changed the base branch from dev to main October 10, 2024 10:09
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