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

feat: API status banner #191

Open
Ushie opened this issue Oct 19, 2023 · 8 comments · May be fixed by #254
Open

feat: API status banner #191

Ushie opened this issue Oct 19, 2023 · 8 comments · May be fixed by #254
Assignees
Labels
Feature request Requesting a new feature that's not implemented yet

Comments

@Ushie
Copy link
Member

Ushie commented Oct 19, 2023

Display a banner at the top of the webpage if the API is down/inaccessible

@oSumAtrIX oSumAtrIX moved this to 📋 Backlog in Development of ReVanced Jan 7, 2024
@oSumAtrIX oSumAtrIX added the Feature request Requesting a new feature that's not implemented yet label Jan 7, 2024
@oSumAtrIX
Copy link
Member

oSumAtrIX commented Jan 8, 2024

The API is inaccessible if it timeouts or returns anything other than a non-OK response. In both cases, a dedicated banner message should be shown. In addition to the API being down, an offtopic idea can be to cache API responses in case the API is inaccessible.

@KTibow
Copy link
Contributor

KTibow commented Jan 16, 2024

From what I understand this isn't a simple change. There is no centralized place or store to check the status from. It might require wrapping every API call or something.

@Ushie
Copy link
Member Author

Ushie commented Jan 16, 2024

We have this https://api.revanced.app/v2/ping endpoint which we can use, we can ping it on website initial load and check the status code

If the status code is unexpected, we can display a banner above the navbar

@Ushie
Copy link
Member Author

Ushie commented Jan 16, 2024

Seems like the endpoint is currently broken, will open an issue in the API repository

@oSumAtrIX
Copy link
Member

The API expects a HEAD request

@Ushie
Copy link
Member Author

Ushie commented Jan 16, 2024

Right

@oSumAtrIX oSumAtrIX assigned Ushie and unassigned KTibow Jun 3, 2024
@oSumAtrIX oSumAtrIX assigned xafn and unassigned Ushie Jun 29, 2024
@madkarmaa
Copy link
Member

I think at the top is not the best choice, because if you add the element everything in the page is shifted downwards, and if you make the element fixed, it'll cover the navbar buttons. I think a fixed banner at the bottom of the page is ideal, even better with a close button which will keep it closed until the site is refreshed

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Aug 13, 2024

If the API is down the website won't work as expected & if the banner is at the bottom it wont be noticed, especially on mobile. Additionally, eventually with announcements being shown on Website, for the latest one, we would reuse the banner to display the announcement & if the banner would be at the bottom, it would be inconsistent, since announcements would be shown at the top, or if at the bottom, go unnoticed once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Requesting a new feature that's not implemented yet
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

5 participants