Skip to content

DOC: adding main nav to site #15489

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

Merged
merged 4 commits into from
Oct 25, 2019
Merged

DOC: adding main nav to site #15489

merged 4 commits into from
Oct 25, 2019

Conversation

dorafc
Copy link
Contributor

@dorafc dorafc commented Oct 23, 2019

PR SUMMARY

Added a main nav to separate nav links from breadcrumb links
This should make navigating matplotlib.org easier
Matplotlib__Python_plotting_—_Matplotlib_3_1_1_post2348_dev0_g03bc3c116_documentation

Questions

  1. Are these the correct links to appear in the nav?
  2. I tried something clever with the font to look like the logo font, and it may not appear the same on all machines. Can someone let me know if it looks bad on their machines?

Next step will be to replace the "fork me on GitHub" ribbon. I figure this is better handled in a separate PR.

@story645 @efiring @timhoffm @tacaswell

Added a main nav to sperate nav links from breadcrumb links
This should make navigating matplotlib.org easier
@efiring
Copy link
Member

efiring commented Oct 23, 2019

When I bring it up on my Mac with Firefox, I get the magnifier cursor, and I can't seem to get rid of it while on that page.

@timhoffm
Copy link
Member

@jklymak
Copy link
Member

jklymak commented Oct 23, 2019

The logo and h1 are a cobalt blue. Making this band darker blue looks jarring to me.

@ImportanceOfBeingErnest
Copy link
Member

  1. Those are the correct links.
  2. This is how it looks for me on Windows with Firefox 70:
    image
    So the font is definitely different compared to the screenshot above - but personally I don't care too much.

My thoughts quickly:

  • I would prefer a slightly larger font. This appears tiny compared to the rest of the page, while it's really the most important navigation element.
  • Since it's not obvious that clickinig on the logo above returns to the main page, some link for that would be preferable. Either saying "Home" or showing a house as symbol.
  • Some indication for which element is hovered would be nice. Currently we have underlining; but changing color of text and/or background might do it as well.
  • I would put contributing last in the list. It's the least important for the average user. For the rest, maybe Installing, Docs, Examples, Tutorials is a more natural order?

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

I also agree that a hover would be nice. I can take or leave the all-caps.


/* new main nav */
nav.main-nav{
background-color: #002b47;
Copy link
Member

Choose a reason for hiding this comment

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

Background color should be same as h1 color? #11557C

Copy link
Member

Choose a reason for hiding this comment

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

I like that the color is somewhat darker than the logo and headings. It gives some additional separation. With the same color, logo nav and headings would blend too much into each other.
Might be a tiny bit lighter though (in between current and the headings color).

Copy link
Member

Choose a reason for hiding this comment

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

Its already light on dark, so I bet that would stand out more than adequately. I think limiting your color palette and fonts is something most web design tips will suggest...

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 did try making the nav the same color as the logo, and it made the page look very flat. Tim is correct that the darker nav creates visual separation between the elements. I don't recommend making the logo and the nav the same color.

Limiting a designs color palette is usually a good plan. However, the site color scheme currently only has two colors (logo blue and orange) and, unfortunately, it's pretty much impossible to build a meaningful site hierarchy with only two colors.

Many websites have formal guidelines about how to apply color (see https://material.io/design/color/ for Google, https://primer.style/css/utilities/colors for Github). It might be nice to re-think the site color palette using the colors in Viridis in the future, but this would be a much larger and more complex project.

Copy link
Member

Choose a reason for hiding this comment

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

These things are purely aesthetic, so whatever folks decide works is fine. Here is what I was suggesting (plus or minus) for comparison:

Front

/* new main nav */
nav.main-nav{
background-color: #002b47;
font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
Copy link
Member

Choose a reason for hiding this comment

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

I don't see that we use Calibri anywhere else. Is there a reason for this choice? Just like colors, I find the diversity of fonts on the front-page impressive enough already without adding more.

Choose a reason for hiding this comment

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

Calibri is the font used by the logo text. Which means my screenshot above is actually using Calibri and the screenshot in the original post is falling back to some other font.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but then lets make a lot more of the header text Calibri if thats what we want. I'm not too fussed if the logo (or plots) is a different font because it is quite distinctive, but I'd prefer we minimize the html fonts.

Copy link
Member

Choose a reason for hiding this comment

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

Calibri has a proprietary license. While I think that's not an issue as long as we just reference it in CSS but don't distribute it, it might be nice to use a font with an open license for an open source project. Also, it's usually only available on Windows, so many users will fall back to something else anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, Calibri is the font used in the logo and it is a licensed font (though many people have it installed on their computers via microsoft products). The font family property will load Calibri if visitors already have it already installed on their computers. Otherwise, browsers will go down the list until it finds a font that matches. There are open source alternatives that we could load with the webpage, but this would be a bigger projects thats best handled in a different conversation about branding (and maybe sticker budgets)

Helvetica is the only font currently used as browser rendered text on the site–Here's the font stack:

body {
font-family: "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
)

I usually design slightly different treatments for header navigation text, since it serves a different purpose on a webpage from text or headers in the main content (a nav helps site visitors find a page and text is for absorbing content). I did try doing something with Helvetica, but it only contributed to the page looking like a wall of text.

font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 11px;
Copy link
Member

Choose a reason for hiding this comment

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

Elsewhere font sizes are specified as ems. That makes it easier to re-size the whole page if we want. Any reason to hard-code the sizes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modern web browsers will zoom in on pixel-sized text correctly these days (especially since we're all looking at the web with devices with different screen resolutions). Ems are more useful these days when building layouts that scale with parent containers.

I do appreciate that you're thinking about website accessibility though.

@tacaswell tacaswell added this to the v3.2.0 milestone Oct 23, 2019
@jklymak
Copy link
Member

jklymak commented Oct 23, 2019

FWIW, I don't have any weird issues w/ this page on Firefox.

@story645
Copy link
Member

story645 commented Oct 23, 2019

This looks awesome! Thanks!
I agree with @ImportanceOfBeingErnest that the order feels a bit off, and I'd probably also go with something like his order:
Installation, Documentation, Examples, Tutorials, Contributing (only because it keeps similarly conjugated words adjacent)

ETA: I like the dark blue, think it grounds the menu & makes it easy to spot.

@QuLogic
Copy link
Member

QuLogic commented Oct 24, 2019

I have Carlito installed, which is supposed to be metrically compatible with Calibri, and I used it to try and figure out the logo example sizes. Since that seemed to work reasonably, I guess it should be, but the text on the webpage looks kind of small:
Screenshot_2019-10-23 Matplotlib Python plotting — Matplotlib 3 1 1 post2349+g44ad3051c documentation
Maybe because it's in px and not em like mentioned above?

@dorafc
Copy link
Contributor Author

dorafc commented Oct 24, 2019

More responses to your feedback -

I would prefer a slightly larger font

We don't want the nav to overwhelm the rest of page content, but I'm happy to make the font larger.

Since it's not obvious that clickinig on the logo above returns to the main page, some link for that would be preferable. Either saying "Home" or showing a house as symbol

The internet has been around long enough that people usually intuitively know the to click on the logo to get back to the homepage. Though it might make sense to put the home link back in the breadcrumb.

Some indication for which element is hovered would be nice

Yup. I forgot to do this...

I would put contributing last in the list. It's the least important for the average user. For the rest, maybe Installing, Docs, Examples, Tutorials is a more natural order?

Installation, Documentation, Examples, Tutorials, Contributing

We put Installation at the end since it would be easier to find. Whats the best way to come to consensus about the link order? What does everyone think about changing "Examples" to "Sample Plots"?

(only because it keeps similarly conjugated words adjacent)

This is my most favorite suggestion I've ever heard about how to order links on a site, though I'd recommend focusing on user needs first

@dorafc
Copy link
Contributor Author

dorafc commented Oct 24, 2019

I have Carlito installed, which is supposed to be metrically compatible with Calibri

I've added Carlito to the font stack. Adding the font to the site later to replace Calibri might be a good idea

@tacaswell
Copy link
Member

I think this should be reviewed under the same criteria as docs changes ("is it better", single reviewer merge) however, I'm going to recuse my self from merging @dorafc 's PRs.

latest build: https://circleci.com/gh/matplotlib/matplotlib/25898/artifacts/0//home/circleci/project/doc/build/html/index.html

@story645
Copy link
Member

story645 commented Oct 24, 2019

We put Installation at the end since it would be easier to find.

I think @ImportanceOfBeingErnest & I put it first because that's where we kinda expect to find installation/it's kind of the default location:
Sklearn:
image
Django:
image
Pandas:
image

This is my most favorite suggestion I've ever heard about how to order links on a site, though I'd recommend focusing on user needs first

In all seriousness, it follows the convention shown above: install, then documentation, keeping examples & tutorials next to each other since they're two sides of the same coin, then contribute 'cause it's usually at the end.

I'm +-0 on sample plots since its two words but mostly 'cause visualizations and plots aren't 100% interchangeable as much as we tend to use 'em as such. Example gallery maybe?

@QuLogic
Copy link
Member

QuLogic commented Oct 24, 2019

12px is definitely a better size than 11px now. My only other suggestion is font-weight:bold. With inverted backgrounds, a thin font can be a bit less legible. I'm not sure how this affects Calibri as your original screenshot seems much bolder already, but thicker Carlito seems nicer at least.

@efiring
Copy link
Member

efiring commented Oct 24, 2019

I prefer just plain "Gallery" or "Examples".

@tacaswell tacaswell modified the milestones: v3.2.0, v3.1-doc Oct 25, 2019
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the quick turn around on the suggested changes!

@dorafc
Copy link
Contributor Author

dorafc commented Oct 25, 2019

Thanks for all the feedback. FWIW, I'm looking into if we can add Carlito onto the site easily (@QuLogic -- it does look a lot better). It would make accomodating the font stack fallbacks easier. At initial glance, it looks like its an older license that doesn't take the web into consideration...

tacaswell added a commit that referenced this pull request Oct 25, 2019
…489-on-v3.1.1-doc

Backport PR #15489 on branch v3.1.1-doc (DOC: adding main nav to site)
tacaswell added a commit that referenced this pull request Oct 25, 2019
…489-on-v3.1.x

Backport PR #15489 on branch v3.1.x (DOC: adding main nav to site)
tacaswell added a commit that referenced this pull request Oct 25, 2019
…489-on-v3.2.x

Backport PR #15489 on branch v3.2.x (DOC: adding main nav to site)
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.

8 participants