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

Center loading screen and add logo #1668

Merged
merged 1 commit into from
Mar 3, 2018
Merged

Center loading screen and add logo #1668

merged 1 commit into from
Mar 3, 2018

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Oct 28, 2017

Before After
28-205179221 28-204858517

Javascript message was broken in 1d47290

@xPaw xPaw requested a review from astorije December 3, 2017 15:08
@xPaw xPaw added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Dec 21, 2017
@astorije astorije added this to the 3.0.0 milestone Jan 19, 2018
@@ -95,7 +88,7 @@ <h1 class="title" id="loading-title">The Lounge is loading…</h1>
<div id="image-viewer"></div>

<script src="js/bundle.vendor.js"></script>
<script src="js/bundle.js"></script>
<script src="js/bundlez.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidental z?

Copy link
Member

@AlMcKinlay AlMcKinlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like it a bit better.

}

#loading p {
margin-top: 10px;
}

#loading img {
max-width: 256px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a max-height or something (Chrome tells me the image shows as 256px x 171.48px)? On load there is a bump until the image is loaded, which is right in the middle of loading (at least in my case).
I'm playing with slow network and it does that too.

@astorije
Copy link
Member

This is so nice!

I noticed that on screens that aren't very high, like landscape mode on mobile, it tends to do this:

screen shot 2018-02-28 at 00 56 32

How expensive would it be to fix this?

@xPaw xPaw force-pushed the xpaw/center-loading branch 2 times, most recently from 91ea13f to 85ac9c2 Compare February 28, 2018 17:37
@xPaw
Copy link
Member Author

xPaw commented Feb 28, 2018

@astorije Fixed it up by further using flexbox instead of absolute positioning.

I also set exact size on the image so the jumping doesn't happen. Can you confirm it's fine now?

</div>
</div>
<div id="loading-status-container">
<img src="img/logo-vertical-transparent-bg.svg" alt="The Lounge" width="256" height="170">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I often forget, but we allow server config to specify a custom theme, which is then used on loading screen. When theme is dark, result is pretty horrible:

screen shot 2018-02-28 at 23 42 19

What about having a second image here (this one) hidden with CSS, then custom themes can hide the normal one and display inverted logo only?

(Alternatively, get rid of server config for theme and only have official theme on page load... :trollface: I know, I know, this idea is not liked 😅)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, I know, this idea is not liked

It's not liked because those of us using dark themes don't like a bright flash when loading the lounge. If we were to get custom themes to sync from client to server, then I'd be fine with removing the server theme. Only then.

Also, bear in mind that even if you did remove the server theme, the client theme takes over before this screen goes away sometimes, so this still needs to be dealt with.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was not a real suggestion, just a bit of trolling :D
Real suggestion is the 2 images, but there are probably others (css background?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you were trolling, I'm just making sure people know the reasons for it :-P

As for the actual feature...I'm not sure which I prefer. The hidden image is easiest for theme makers, but also most feels like a hack. Maybe just making both images available on the server and themes can set css background, as you say. Shouldn't be too difficult?

Other option (this is bigger than this PR I think) is we can have a way for themes to set themselves as "light" or "dark" and they can inherit things like this from defaults.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do some color changing dynamically (e.g. from manifest or background color) as it's svg.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could also work.

@astorije
Copy link
Member

astorije commented Mar 1, 2018

Very nice fixes @xPaw, good job!

@xPaw
Copy link
Member Author

xPaw commented Mar 1, 2018

Okay I've embedded the SVG in html itself, this allows themes to individually change colors of the logo.

@dgw
Copy link
Contributor

dgw commented Mar 1, 2018

How does letting themes change the logo colors square with the brand guidelines given by the logo designer in #282? Specifically, "Don't alter or change the colors".

@astorije
Copy link
Member

astorije commented Mar 2, 2018

What @dgw said is on point. Let's not do this, it would be a recipe to disaster.
If someone's theme does not work with a given background, then they should hide the logo instead of altering it.

Let's go with either having 2 images, or choosing the image via CSS background like @McInkay mentioned. I don't have a preference over which of those solutions though.

@xPaw
Copy link
Member Author

xPaw commented Mar 2, 2018

Brand guideline or not, I think this is a slightly more elegant solution, as opposed to having to switch images (either there are 2 img tags in the page, or change background-image).

@astorije
Copy link
Member

astorije commented Mar 2, 2018

That requires theme authors to set up our specific colors as opposed to pick an image, I don't find that elegant at all from a theme author perspective. Also not very elegant to embed the SVG code within the markup IMO.
And I am 💯% sure that themes will go nuts on the logo colors.

I think we really shouldn't do that.

@xPaw
Copy link
Member Author

xPaw commented Mar 2, 2018

@McInkay which method do you prefer? Coloring individual parts via CSS (svg is embedded in html) or changing background image via css?

I don't want to put 2 tags because then the browser will start downloading both images.

@AlMcKinlay
Copy link
Member

Euch.

I think I'm probably with @astorije - we have strict guidelines around the logo, so we shouldn't encourage breaking the guidelines. So probably background css.

@xPaw
Copy link
Member Author

xPaw commented Mar 2, 2018

Mind you, changing image url won't stop theme designers from switching to any other logo they've designed (so they could copy the svg and change the colors there)...

@astorije
Copy link
Member

astorije commented Mar 2, 2018

All things considered, I would prefer having both <img> elements over background CSS, and way way over SVG + custom colors. Optimized SVG file is 2.62 KB, 475 bytes transferred over the network (according to Chrome devtools). I think we can live with the overhead :)
(EDIT: Looks like 1,175 bytes actually, but either way :bikeshed:)

@astorije astorije changed the title Center loading screen Center loading screen and add logo Mar 3, 2018
@xPaw xPaw merged commit e0b15f1 into master Mar 3, 2018
@xPaw xPaw deleted the xpaw/center-loading branch March 3, 2018 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants