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: add dark splash screen, ref #4398 #4935

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

alter-eggo
Copy link
Contributor

@alter-eggo alter-eggo commented Feb 10, 2024

Try out this version of Leather — Extension build, Test report

Screen.Recording.2024-02-11.at.00.29.10.mov

public/assets/base.css Outdated Show resolved Hide resolved
width="100%"
mx={['', 'space.04']}
animation="fadein"
animationDuration="500ms"
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

@alter-eggo alter-eggo marked this pull request as ready for review February 19, 2024 17:52
@@ -1,12 +1,13 @@
<!doctype html>
<html class="mode__popup light">
<html class="mode__popup light splash-screen">
Copy link
Contributor

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?

Copy link
Contributor Author

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

@@ -48,10 +50,26 @@ function setUserSelectedTheme(theme: UserSelectedTheme) {
interface ThemeSwitcherProviderProps {
children: React.JSX.Element | React.JSX.Element[];
}

function removeDefaultBg() {
Copy link
Contributor

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? 🤔

Copy link
Contributor Author

@alter-eggo alter-eggo Feb 20, 2024

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

public/assets/base.css Outdated Show resolved Hide resolved
public/html/index.html Show resolved Hide resolved
@alter-eggo alter-eggo added this pull request to the merge queue Feb 20, 2024
Merged via the queue into dev with commit c4fb072 Feb 20, 2024
28 checks passed
@alter-eggo alter-eggo deleted the feat/splash-screen2 branch February 20, 2024 08:06
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

Successfully merging this pull request may close these issues.

5 participants