Skip to content

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