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

Improve Cold Start requests by adding timeout and blocking user input #261

Closed
AntonioMrtz opened this issue Oct 16, 2024 · 3 comments · Fixed by #264
Closed

Improve Cold Start requests by adding timeout and blocking user input #261

AntonioMrtz opened this issue Oct 16, 2024 · 3 comments · Fixed by #264
Assignees
Labels
frontend Frontend related issues good first issue Good for newcomers hacktoberfest hacktoberfest help-wanted Help is wanted javascript Pull requests that update Javascript code

Comments

@AntonioMrtz
Copy link
Owner

Description

Improve Cold Start requests by adding timeout and blocking user input like buttons when the request is being processed

Context

In production, when the server is having a cold start, there're multiple requests that can block the app until a response is given. Cold start can be near 50s. We want to cancel the request if it's taking too long.

How to do it

There're 3 requests that can be done for connecting for the first time with the server:

To solve this we expect to:

  • Make the request timeout if it takes more than 5s (autologin, login, sign up)
  • If timeout is reached show cold start message already implemented
  • Block user input while processing the request (cant click login, sign up and login/sign switch buttons
  • Show loading circle when one of the requests is being made

Testing

Show the expected result ( popover message ) is thrown when start requests take more than a fixed amount of time

@AntonioMrtz AntonioMrtz added good first issue Good for newcomers frontend Frontend related issues help-wanted Help is wanted javascript Pull requests that update Javascript code hacktoberfest hacktoberfest labels Oct 16, 2024
@gigigimay
Copy link
Contributor

gigigimay commented Oct 16, 2024

Hi, I would like to work on this. Could you assign me this issue?

@AntonioMrtz
Copy link
Owner Author

Hi @gigigimay , all yours :). Tell my if you need anything, we also have the project docs here

gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 18, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
gigigimay added a commit to gigigimay/SpotifyElectron that referenced this issue Oct 24, 2024
AntonioMrtz pushed a commit that referenced this issue Oct 24, 2024
… input | [#261]

* feat: handle loading and server timeout in StartMenu | [#261]

* feat: handle register loading and timeout in RegisterMenu | [#261]

* feat: cancel requests when timeout for login + autologin + register | [#261]

* fix: revert mocked token | [#261]

* feat: move loading circle into the button | [#261]

* test: add unit tests for login + auto login + register request timeout | [#261]

* refactor: remove unused and refactor css | [#261]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend related issues good first issue Good for newcomers hacktoberfest hacktoberfest help-wanted Help is wanted javascript Pull requests that update Javascript code
Projects
None yet
2 participants