-
Notifications
You must be signed in to change notification settings - Fork 146
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 dark splash screen, ref #4398 #4935
Conversation
4e8723b
to
cd23acc
Compare
width="100%" | ||
mx={['', 'space.04']} | ||
animation="fadein" | ||
animationDuration="500ms" |
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.
While reviewing I was wondering wether we could use a combination of animationDelay
and animationDuration
so that we can make the fade feel a bit snappier (feels faster / more "performant") while still ensuring all elements are loaded in place to avoid a jumpy UI. However, the delay doesn't seem to work / affect the animation, not sure why. This is already really nice btw and def. an improvement which I think is shippable, just wondering
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.
I feel like animation duration won't work here. to avoid this jumpy UI we prob need to show some loader/splash screen until page is full rendered https://stackoverflow.com/questions/40987309/react-display-loading-screen-while-dom-is-rendering
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 loading time is very short (I'd say anything below ~1s) we could get away with just leaving the screen blank and then fade the content in. IMO we should only show a loading screen if we anticipate things taking 1s+, otherwise you end up with an experience where you briefly see a loading spinner flashing and then directly transitioning into something else which doesn't feel great.
cd23acc
to
777a808
Compare
public/html/popup.html
Outdated
@@ -1,12 +1,13 @@ | |||
<!doctype html> | |||
<html class="mode__popup light"> | |||
<html class="mode__popup light splash-screen"> |
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.
We already have a class added light
or dark
, maybe we can do this all with just CSS?
So if the class is dark
set the background-color: #12100F
?
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.
I thought on this and decided to completely remove this class, and instead of this add absolute splash-screen
div
src/app/common/theme-provider.tsx
Outdated
@@ -48,10 +50,26 @@ function setUserSelectedTheme(theme: UserSelectedTheme) { | |||
interface ThemeSwitcherProviderProps { | |||
children: React.JSX.Element | React.JSX.Element[]; | |||
} | |||
|
|||
function removeDefaultBg() { |
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 we set the BG color in bases.css
do we then need to remove it? We can have another BG colour on top of it then in the react components? 🤔
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.
I added this class with "!important" color to avoid flashing colors on splash screen
777a808
to
613fc9d
Compare
613fc9d
to
9af2812
Compare
9af2812
to
2097af3
Compare
Screen.Recording.2024-02-11.at.00.29.10.mov