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

Need to RE-try to connect to Medusa service on broken connection; Refresh of home page with logo-press #10761

Closed
rafi-d opened this issue Jun 14, 2022 · 3 comments

Comments

@rafi-d
Copy link
Contributor

rafi-d commented Jun 14, 2022

The medusa GUI is not showing the home page after failed connection (usually after Windows startup & Browser auto-startup)
To emulate and Reproduce

  1. Stop medusa service and close the browser (make sure to be on /home/ page
  2. re-start the browser. Try to connect and fail
  3. Start medusa server . Medusa will not re-connect
  4. Press the medusa logo , medusa will not show the shows' list
  5. refresh the browser page - everything is fine
    Expected behavior
  6. Medusa should keep trying to connect to the service, say once every 5 seconds
  7. Pressing Medusa Logo when on the home page - should refresh the home page, this will also be consistent with pressing the logo from other pages and moving to home.

Screenshots
image

Medusa (please complete the following information):

Medusa Info: Branch: master Commit: e4870f8 Version: 0.5.29 Database: 44.19
Python Version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
SSL Version: OpenSSL 1.1.1n 15 Mar 2022
OS: Windows-10-10.0.19044-SP0
Medusa Info: Branch: [master](https://github.com/pymedusa/Medusa/tree/master) Commit: [e4870f8](https://github.com/pymedusa/Medusa/commit/e4870f8f4a322e67c77434597ccc09aa6524aa05) Version: [0.5.29](https://github.com/pymedusa/Medusa/releases/tag/v0.5.29) Database: 44.19 Python Version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] SSL Version: OpenSSL 1.1.1n 15 Mar 2022 OS: Windows-10-10.0.19044-SP0
@p0psicles
Copy link
Contributor

p0psicles commented Jun 14, 2022

The medusa UI is build using a SPA (single page application). What you are asking is to implement PWA (progressive web app), or also called Service Workers. Which is something that we will do at some point. But not that high of a prio.

Because it's a SPA, clicking the Logo will direct you to the Home route and not refresh the entire page. You don't want to reload it the entire page when you click the logo, because that's something you want to prevent when the page loads fine. The idea of a SPA is to load a minimum amount of data to do a first render. And hydrate the page with additional data using json requests when it's needed.

Also there isn't much of a need to have the medusa logo refresh the page, as each browser has it's refresh button one click away. So if it couldn't connect, just click the refresh button.

@rafi-d
Copy link
Contributor Author

rafi-d commented Jun 14, 2022

So if it couldn't connect, just click the refresh button.

Yes, I already said that it works... Still , is it difficult to make it refresh with the logo click WHEN it is already on the home page (until you implement PWA)? When auto-recover from service issues is not available - it's just a small thing that can be nice to have.

@p0psicles
Copy link
Contributor

Usually you don't want to behave a link different depending on what page you are. Cause a user likes predictable behavior. So that's why i'm not really a fan of that.

Although I could see if I can catch connection errors and set a global flag. So only have it refresh when there are connection issues. But also that i'm not to sure about tbh.

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