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

Improve layout of Rails Guides index #34265

Merged
merged 3 commits into from Oct 20, 2018

Conversation

olivierlacan
Copy link
Contributor

@olivierlacan olivierlacan commented Oct 19, 2018

Summary

This PR includes three improvements:

  • Leverages the broadly supported CSS flexbox feature to tile the index more efficiently (see screenshot below)
  • Shortens some article names in the index to avoid redundant or unnecessary words to make the index easier to parse (it has grown a lot)
  • Updates the Rails Guides logo and progressively enhances (using CSS min-resolution media queries) it to a high-density version on compatible browsers

Other Information

First, you can check individual commit messages for details on these three specific changes.

Now for some lovely before & after shots.

Layout Before

image

Layout After

image

Logo Before (3,770 bytes)

rails_guides_logo

Logo After (1x, 2,340 bytes)

rails_guides_logo_1x

Logo After (2x, 3,107 bytes)

rails_guides_logo_2x

I exported these new versions of the logo from the source PSD in the rails/homepage repo so I have pretty high confidence this is the correct version we should be using.

This notably allows us to tile each category without pushing the page down vertically
as much as we previously did on any viewport wider than mobile sizes.

It also means we can fit more guides which will become useful in the future since
we have several new guides in the work.

Finally the new layout allows three clearly distinct columns to emerge:
- Start Here and Rails basics: Models, Views, Controllers, Other Components
- Digging Deeper, Extending Rails, Contributing, Maintenance
- Release Notes

Having Release Notes shoot back up to the top of the third column is great
because that makes finding the latest released version and its associated
release notes much easier without having to scroll down a bunch.

[ci skip]
The names are only used in the Guides Index overlay and several of them are
longer than they need to be.

For example “Ruby on Rails” is mentioned over and over again in the Release
Notes section although these are obviously all Rails versions we’re listing.

There’s a Maintenance Policy category with a Maintenance Policy article which
is redundant. Policies makes much more sense as a category.

Similarly, Contributing to Ruby on Rails is both a category and an article.
“Contributions” is a better category title. “Ruby on Rails Guides Guidelines” is
a gigantic mouthful. We are *in* the Rails Guides, we don’t need to specify
what guides we’re talking about here.

As a final added advantage, all of these shortenings make the index much easier
to parse in order to find an article.

[ci skip]
The previous version wasn’t matching the Rails Guides logo source file
listed at https://github.com/rails/homepage/blob/master/materials/rails_guides_logo.psd
somehow. It was also a GIF when an 8-bit PNG results in a smaller file (2KB vs 4KB) which
should be just as widely compatible with browsers.

And that’s just for the 1x version. I added a new 2x version for “retina” or high-density
displays and a CSS @media query to progressively enhance with this high density
version of the logo. I’ve ensured that this query is supported across browsers by
using vendor-specific versions when necessary. See:
https://caniuse.com/#feat=css-media-resolution

[ci skip]
@rails-bot
Copy link

r? @kamipo

(@rails-bot has picked a reviewer for you, use r? to override)

@rails-bot rails-bot bot added the docs label Oct 19, 2018
@olivierlacan
Copy link
Contributor Author

I'm considering suggesting the repeated listings of 5.2 Release Notes for each version might be much more useful if we listed the date of the release and clarified that 5.2 is a version (I know it's fairly obvious to most of us, but it may not be to all) with Version 5.2 - 2018-04-09 instead.

I've tried to use the full date instead but that resulted in variable width which made the layout a bit more messy and difficult to read. I think it might even make sense to remove the specific date and simply list the month of release if 2018-04-09 feels hard to read for humans. Technically it's one of the most universally understandable date formats, unlike most English date formats. But Version 5.2 - April 2018 does look a bit more pleasing on the eye.

YYYY-MM-DD

image

Month Year

image

Thoughts?

@olivierlacan
Copy link
Contributor Author

r? @schneems since it's sort of a follow-up to #34257 sorta kinda.

@rails-bot rails-bot assigned schneems and unassigned kamipo Oct 20, 2018
Copy link
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

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

Agree re. Version 5.2 - April 2018 as well. Let's make improvements in separate PRs.

@jeremy jeremy merged commit 5943a55 into rails:master Oct 20, 2018
olivierlacan added a commit to olivierlacan/rails that referenced this pull request Oct 22, 2018
We repeat the phrase "Release Notes" even though release note are listed
under a... "Release Notes" category already. With this change, instead
of repeating ourselves, we can give people a sense of the recency of
each release by simply listing the month and year of each release.

This is a follow-up to rails#34265 as suggested by @jeremy.

[ci skip]
jeremy pushed a commit that referenced this pull request Oct 27, 2018
We repeat the phrase "Release Notes" even though release note are listed
under a... "Release Notes" category already. With this change, instead
of repeating ourselves, we can give people a sense of the recency of
each release by simply listing the month and year of each release.

This is a follow-up to #34265 as suggested by @jeremy.

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants