-
-
Notifications
You must be signed in to change notification settings - Fork 43
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: Add banner for when the API is down #254
base: dev
Are you sure you want to change the base?
Conversation
Caution should use a different icon & all the colors are too saturated, use the same saturation/contrast as the other colors. The info banner should use the blue highlight color |
Such as? I've searched for "caution" on svgrepo.com
They're just placeholders, I didn't really follow the theme (for now)
The text selection color wasn't altered, or are you referring to something else? |
If the PR isn't ready, mark as a draft |
above commit ^^^ tested to work with static build |
Warning should be orange/yellow tinted |
I couldn't find anything that follows the m3 color rules |
@oSumAtrIX what's the practical use of a permanent banner when a simple page refresh is gonna bring it back? I don't see any user willing to stay with the website open on their browser until the API is back up again |
The practical use is that it does not overlap over any content so the user isn't drawn to dismiss the banner & isn't needed ro refresh the page. If the API is down & the banner is dismissed there's no indication left that the site won't work properly. A permanent small banner at the top prevents that. |
TODO: find a way to detect the permanent banner on homepage to modify css of some elements
This reverts commit ae9cf8c.
Co-authored-by: oSumAtrIX <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Resolve the navbar not sticking to the top when scrolling
- Confirm the API outage banner is only displayed when appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The margin-top
changes across pages doesn't consider cases where there is no banner being displayed, perhaps a minor refactor where we wouldn't need magic numbers would be good
@Ushie where exactly? |
The issue is a bit difficult to solve. The banner is sticky so we have to simulate a hidden non sticky banner so the content shifts down. I guess what we can do is add the margin to that simulated banner, so when the banner is hidden, the margin is gone too |
<Banner level="caution" permanent> | ||
The API is currently unresponsive and some services may not work correctly. Check | ||
the <a | ||
href="https://status.revanced.app/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the status page may not be the best idea, but there is no other place that links to it. It'll be present in https://api.revanced.app/v4/about under the key "status" in the next API release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the API is down, how is the website expected to parse that from the API?
What's this?
This PR adds the
<Banner />
component and some functionality. Originated from issue #191Screenshots (as of commit 8fa880b)
Level:
caution
Level:
warning
Level:
info