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

Missing loading status indicator / callback #175

Closed
ekzyis opened this issue Dec 28, 2023 · 2 comments
Closed

Missing loading status indicator / callback #175

ekzyis opened this issue Dec 28, 2023 · 2 comments

Comments

@ekzyis
Copy link

ekzyis commented Dec 28, 2023

As an (impatient) user, I expect to be told if something is loading else I might think that nothing is going to happen or something broke. Even if it's just for a few seconds. In this case, there were around 3 seconds of no user feedback between submitting the form and showing an error (00:09 - 00:12):

2023-12-28.21-35-26.mp4

It would be nice if there is a callback onLoading like onConnected and onDisconnected or similar so developers can use these callbacks to build their own loading spinners etc.

@ekzyis ekzyis changed the title Missing loading status indicator and API Missing loading status indicator / callback Dec 28, 2023
@rolznz
Copy link
Collaborator

rolznz commented Dec 29, 2023

@ekzyis there are onConnecting, onConnected and onDisconnected subscription functions exposed by Bitcoin Connect.

I think it would be nice to also add a skeleton loader on the balance component.

Ideally with LNbits though we would add a connection check to see if the connection is valid (by doing an API call). This can be done in the LNbits connector init function, and if the call fails an error should be thrown which will stop Bitcoin Connect from connecting. https://github.com/getAlby/bitcoin-connect/blob/master/src/connectors/LnbitsConnector.ts#L22

If this sounds good to you, we can add a new issue to add a skeleton loader for the balance component, and close this one.

@ekzyis
Copy link
Author

ekzyis commented Dec 29, 2023

@ekzyis there are onConnecting, onConnected and onDisconnected subscription functions exposed by Bitcoin Connect.

Oh, I forgot about that one when I created this ticket! Thanks, will check it out and report back.

Ideally with LNbits though we would add a connection check to see if the connection is valid (by doing an API call). This can be done in the LNbits connector init function, and if the call fails an error should be thrown which will stop Bitcoin Connect from connecting. https://github.com/getAlby/bitcoin-connect/blob/master/src/connectors/LnbitsConnector.ts#L22

This sounds similar to what #174 is about

If this sounds good to you, we can add a new issue to add a skeleton loader for the balance component, and close this one.

Sounds good! Feel free to close this one. I will check out onConnecting and will simply report back if that doesn't solve my use case.

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

2 participants