Skip to content

Implement new 5.0 loading screen.#8970

Merged
cjcenizal merged 6 commits intoelastic:masterfrom
cjcenizal:6466/improvement/sweet-sweet-loading
Nov 15, 2016
Merged

Implement new 5.0 loading screen.#8970
cjcenizal merged 6 commits intoelastic:masterfrom
cjcenizal:6466/improvement/sweet-sweet-loading

Conversation

@cjcenizal
Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal commented Nov 4, 2016

Addresses #6466 and #8114

Prototype: http://codepen.io/cjcenizal/pen/ObJoJO

There's a weird flash of no content as the DOM gets changed by Kibana when it's loading. I suggest we address that in another ticket.

loading_indicator

@timroes
Copy link
Copy Markdown
Contributor

timroes commented Nov 4, 2016

Is there a special reason for the padding-bottom in the .kibanaLoader__content, which offsets the "Loading Kibana" a bit to the top?

The first time I looked at it, I instantly got the feeling, oh there is something off, which caused my to look at the code and recognize the padding. In my personal opinion it would look better, if the "Loading Kibana" text would be centered.

@cjcenizal
Copy link
Copy Markdown
Contributor Author

@timroes The idea is the find the visual center for the text. If we remove the padding entirely, the text really feels like it's sitting low in the container:

image

Do you see what I mean?

I can reduce the padding a little, but I think this visual centering is working for me, at least. I'd love to hear other people's thoughts too.

@timroes
Copy link
Copy Markdown
Contributor

timroes commented Nov 4, 2016

I get what you mean. In my opinion - but again taste is so very personal - it felt quite off in a way, that directly "disturbed" me.

On a more technical side: I also looked in the codepen above on it, and in contrast to Kibana Open Sans isn't loaded as a webfont there for me, but Lato is. So it actually renders with another font, than in your screenshots, which looks for me a bit more off, than your screen:

screenshot-20161104-214340

@rashidkpc
Copy link
Copy Markdown
Contributor

I'm with @cjcenizal on this one. Using the visual center makes the content look correctly balanced to me.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Nov 5, 2016

Is it possible we just have the wrong padding for the visual center? For me, both the open sans and lato versions look off-center (sitting high in the container, as you called it). About half the padding makes it look much more centered to me:

screen shot 2016-11-05 at 3 02 16 pm

That would also help make the lato version look less jarring.

@cjcenizal
Copy link
Copy Markdown
Contributor Author

Ahhh I think a fundamental problem is Open Sans isn't even getting loaded, so we're all seeing different things depending on whether you have Open Sans / Lato installed locally. Let me fix that first and then I'll address the visual centering question.

@cjcenizal
Copy link
Copy Markdown
Contributor Author

OK I slightly lowered the visual center, and I also made a much bigger change: instead of serving fonts directly from the Kibana server, we're now using the Google Web Fonts CDN.

This adds an additional external dependency (though non-critical, since if this CDN fails, the user will just see Helvetica or Arial instead of Open Sans), but it also means the font will be cached by users' browsers and we can eliminate the flash of invisible content you saw in the original GIF.

loading_indicator_2

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Nov 7, 2016

@cjcenizal Kibana has to be about to run behind a firewall, so relying on an external CDN for assets isn't ideal. For things like tile maps, we get around that by specifically offering them an alternative means of configuring map support, so they could use their own mapping server from their own network.

@cjcenizal cjcenizal force-pushed the 6466/improvement/sweet-sweet-loading branch from c67a339 to 88c58c8 Compare November 9, 2016 19:20
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These imports are not used here; instead they're used in https://github.com/elastic/kibana/blob/master/src/server/http/register_hapi_plugins.js

@cjcenizal cjcenizal force-pushed the 6466/improvement/sweet-sweet-loading branch from 88c58c8 to cd3a98a Compare November 9, 2016 19:26
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bluebird's resolve isn't being used.

@cjcenizal
Copy link
Copy Markdown
Contributor Author

@spalger @epixa Could you take a look at how I'm copying the font files to bundles and then serving them up? I want to make sure this fits into our current way of doing things.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couple notes:

  • Using server.exposeStaticDir() will ensure that these files are served just like the rest
  • We don't control process.env.PWD, use __dirname
  • resolve() takes multiple arguments and combines them string interpolation is unnecessary
  • The entire bundles directory is already being served at /bundles/
  • Looks like the font files are being stored in the ui/public/assets directory, not the bundles directory

I'm thinking this sections should look something like:

server.exposeStaticDir('/ui/fonts/{path*}', resolve(__dirname, '../../ui/public/assets/fonts'));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the great explanation and example.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These urls need to be absolute and include the basePath or they won't work at both /login and /app/xyz.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This isn't necessary, we can just serve them from where they are

@spalger
Copy link
Copy Markdown
Contributor

spalger commented Nov 10, 2016

Refresh looks really nice, I can't detect any FOUC

@cjcenizal cjcenizal force-pushed the 6466/improvement/sweet-sweet-loading branch from cd3a98a to cf8b7d6 Compare November 15, 2016 00:37
@cjcenizal cjcenizal force-pushed the 6466/improvement/sweet-sweet-loading branch from cf8b7d6 to d02da5c Compare November 15, 2016 00:38
@tylersmalley tylersmalley self-assigned this Nov 15, 2016
@spalger
Copy link
Copy Markdown
Contributor

spalger commented Nov 15, 2016

🎉 🎉 🎉

Copy link
Copy Markdown
Member

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

sweet, sweet - LGTM

@cjcenizal cjcenizal merged commit 26c53e8 into elastic:master Nov 15, 2016
@cjcenizal cjcenizal deleted the 6466/improvement/sweet-sweet-loading branch November 15, 2016 18:07
@epixa
Copy link
Copy Markdown
Contributor

epixa commented Nov 15, 2016

🎉

cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Nov 15, 2016
* Implement new 5.0 loading screen.
* Remove old Kibana loading gif.
* Add Open Sans font files to public/assets/fonts dir, and remove some unused ones.
* Serve fonts directly from ui directory, using exposeStaticDir.
cjcenizal added a commit that referenced this pull request Nov 15, 2016
* Implement new 5.0 loading screen.
* Remove old Kibana loading gif.
* Add Open Sans font files to public/assets/fonts dir, and remove some unused ones.
* Serve fonts directly from ui directory, using exposeStaticDir.
@epixa epixa added v5.1.1 and removed v5.1.0 labels Dec 8, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
* Implement new 5.0 loading screen.
* Remove old Kibana loading gif.
* Add Open Sans font files to public/assets/fonts dir, and remove some unused ones.
* Serve fonts directly from ui directory, using exposeStaticDir.

Former-commit-id: c190e58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants