Skip to content

fix(docs-infra): typography, layout and UI polish - #38750

Closed
sjtrimble wants to merge 2 commits into
angular:masterfrom
sjtrimble:2020-ui-polish-layout-and-typo
Closed

sjtrimble wants to merge 2 commits into
angular:masterfrom
sjtrimble:2020-ui-polish-layout-and-typo

Conversation

@sjtrimble

Copy link
Copy Markdown
Contributor

As discussed with @gkalpak - splitting existing PR #36045 into smaller bit sized PRs

  • Sidenav background to better distinguish from content
  • Header styles updated
  • General typography styles updated (removed letter-spacing, increased font size and updated line height)
  • Prominent h2 styles with line to segment important sections more easily
  • Vertical align headerin glink icons (on hover)
  • Prominent link hover underline (more accessible)
  • Max width on content paragraph text to improve legibility (best practices)
  • Centered layout for better legibility and focus on content
  • API pages override to maintain current styles

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

N/A

Issue Number: N/A

What is the new behavior?

UI updates with a focus on improved legibility

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove
pullapprove Bot requested a review from gkalpak September 9, 2020 05:44
@sjtrimble sjtrimble mentioned this pull request Sep 9, 2020
3 of 14 tasks
@mary-poppins

Copy link
Copy Markdown

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker aio: preview target: patch This PR is targeted for the next patch release labels Sep 11, 2020
@ngbot ngbot Bot added this to the needsTriage milestone Sep 11, 2020

@gkalpak gkalpak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like some of the changes while not a big fan of others, but I think this is a positive change overall 😃

Besides the comments I left, I also noticed some other issues:

  • The commit message mentions Vertical align headerin glink icons (on hover). Apart from the obvious typo, I could find which changes this line refers to. Could it be that this is not included in this PR (or did I miss it)?

  • Now that headings are bigger, the current style of vertical-align: text-top for heading links doesn't work well for me. middle works much better. How does middle look for you?

  • Now that the font is bigger, it causes long API symbol names to be truncated:
    api-truncated

  • For some reason, the footer alignment is broken:
    footer-alignment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This class is not being used anywhere afaict.
Did I miss something? (If not, please remove.)

Comment thread aio/src/styles/1-layouts/_sidenav.scss Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this? It makes menu items without sub-menu considerably shorter than those with sub-menu.

vertical-menu-size-diff

Comment thread aio/src/styles/1-layouts/_sidenav.scss Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
border-right: 1px splid $lightgray;
border-right: 1px solid $lightgray;

Comment thread aio/src/styles/0-base/_typography.scss Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this change? It causes the package name be too close to the symbols in the API list, which is less readable imo:

Before:
api-h2-before

After:
api-h2-after

Comment thread aio/src/styles/0-base/_typography.scss Outdated
Comment on lines 41 to 51

@gkalpak gkalpak Sep 13, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is better to nest the special styles inside the h2:before block:

Suggested change
}
}
aio-shell {
&.page-resources, &.page-events, &.page-features, &.page-presskit, &.page-contribute, &.page-about, &.page-api {
main h2:before {
display: none;
border: 0;
visibility: hidden;
}
}
.page-resources &, .page-events &, .page-features &, .page-presskit &, .page-contribute &, .page-about &, .page-api & {
display: none;
border: 0;
visibility: hidden;
}
}

Comment thread aio/src/styles/0-base/_typography.scss Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed? Isn't setting the .sidenav-content max-width enough?

Comment thread aio/src/styles/0-base/_typography.scss Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💯

Comment thread aio/src/styles/0-base/_typography.scss Outdated

@gkalpak gkalpak Sep 13, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This definitely doesn't lοok good on my screen 😁
external-links-alignment

Does bottom work better for you?

- Sidenav background to better distinguish from content
- Header styles updated
- General typography styles updated (removed letter-spacing, increased font size and updated line height)
- Prominent h2 styles with line to segment important sections more easily
- Vertical align headerin glink icons (on hover)
- Prominent link hover underline (more accessible)
- Max width on content paragraph text to improve legibility (best practices)
- Centered layout for better legibility and focus on content
- API pages override to maintain current styles

@Splaktar Splaktar left a comment

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.

I like the change to make the docs sections made for reading limited to 800px of width. Very long lines of text are harder for people to read.

However I think that pages like the Resource Listing, Events, and Presskit that are more for displaying a different kind of content should be allowed to be wider and use a different layout, which they do. I think that the "About" page should be added to this set of non-800px wide pages:

Before

Screen Shot 2020-09-29 at 19 24 08

After

Screen Shot 2020-09-29 at 19 23 40

It takes a whole lot of vertical scrolling for people to browse through these 3 at a time.

The guide/cheatsheet should also not be restricted to 800px in width as this causes the code examples to be hard to read and adds quite a few horizontal scroll bars where content gets hidden.

The "Introductions to the Angular Docs" page needs some layout tweaks to work with this new layout (and has needed them for some time on smaller devices):

Screen Shot 2020-09-29 at 19 29 45

Other than that, I really like these changes and think that they make the docs a lot more comfortable to read on desktop devices.

@sjtrimble
sjtrimble force-pushed the 2020-ui-polish-layout-and-typo branch from c349f7e to 396cdf2 Compare October 1, 2020 00:29
@mary-poppins

Copy link
Copy Markdown

@AndrewKushnir AndrewKushnir removed the action: merge The PR is ready for merge by the caretaker label Oct 16, 2020
@gkalpak gkalpak mentioned this pull request Nov 7, 2020
@gkalpak

gkalpak commented Jan 14, 2021

Copy link
Copy Markdown
Member

Superceded by #40427. Let's continue the discussion there.

@gkalpak gkalpak closed this Jan 14, 2021
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants