Skip to content

Conversation

@Shrinks99
Copy link
Collaborator

@Shrinks99 Shrinks99 commented Apr 7, 2023

With this PR the docs styling is largely where I'd like it to be for now Neat!

Screenshots

Footer links!

Screenshot 2023-04-06 at 11 47 22 PM

New Page Styling

Goal for this was to improve the hierarchy of titles — I generally dislike thin fonts, hard to scan through documents quickly — and code blocks, as well as implementing the colour scheme I've been working on to differentiate our docs / tool branding with different hues for each of our different tools as mkdocs eventually gets extended and standardized to the other pieces of software we have.

Screenshot 2023-04-07 at 00-05-31 Local Deployment - Browsertrix Cloud Docs

Kind of like this! 👀 .... But that's for another repo! :)

Screenshot 2023-04-07 at 03-58-40 Embedding ReplayWeb page - ReplayWeb Page Docs

Changes

  • Updates background & code block colours
  • Adds footer links!
  • Updates header styles
  • Changes body font to Recursive with appropriate variable axis settings (not monospaced for body text, 0.51 for headers)
    • We self host it now too!
  • Changes header text color
  • Reverts body text color to default (it was the dark green before, meant to only use that for large titles but it wasn't obvious)
  • Adds only the icons we use to the repo along with instructions for adding more.
  • Updates admonition icons (see screenshot above)
    • Changed type from "tip" to "info" where they're used in the deployment section
    • Switched all the other icon types over to Bootstrap's icons in the config
  • Adds docs license info to both the footer & repo readme
    • Removes the dual-licensing bit because we're not doing that?

- Adds a custom stylesheet & brand colours
- Adds Recursive as the code font
- Adds repo info to the nav bar
- Adds auto tracking ID links for deep linking to sections as users scroll the page
- Index pages are now a part of their section as determined by their H1
- Removes mkdocs info from future footer
- Renames "Dev" to "Develop" for improved navigation labels
- Deployment docs are now located under a larger "Development" section (fewer nav bar choices & realistically I think anyone who wants to do one is going to be referring to the other)
- Adds links to tools the first time they're mentioned
- Rewords part of the homepage
- Hides section navigation on the homepage (now we don't have a blank section nav bar!
- Adds some syntax highlighting
- Removes some manual word wrapping — this was done very rarely / inconsistently
- Better title for sidebar
- Adds links to tools
- Adds future docs style guide section
- Updates name and makes it an H1
- Replaces hyphens on the homepage with em dashes
- Updates license section in readme clarifying docs licensing
- Sets Recursive as the main typeface for code and text!
- Adjusts variable axes and sets stylistic alternates accordingly.
- Self hosts the font
@Shrinks99 Shrinks99 added the documentation Improvements or additions to documentation label Apr 7, 2023
@Shrinks99 Shrinks99 requested review from ikreymer and tw4l April 7, 2023 04:15
@Shrinks99 Shrinks99 self-assigned this Apr 7, 2023
@Shrinks99 Shrinks99 marked this pull request as draft April 9, 2023 21:03
@Shrinks99
Copy link
Collaborator Author

Shrinks99 commented Apr 10, 2023

Keeping Ilya's reasonable request to not double the repo's size with a bunch of icons — most of which aren't used at this point and probably never will be — in mind... it seems the best way may be to only copy over the icons we want to use to the overrides/.icons/bootstrap directory. We can't effectively use a CDN (as far as I'm aware) because mkdocs requires us to refer to a local file path for icons defined in the mkdocs.yml file.

If there's a clever way to do this, I'd love to know!

- Updates writing docs page regarding adding icons
@Shrinks99 Shrinks99 marked this pull request as ready for review April 10, 2023 22:59
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Overall looks great! Only thing I noticed in WAVE is that there are a few places where the color contrast is below what WCAG suggests, e.g.:

Screen Shot 2023-04-11 at 11 26 33 AM

Screen Shot 2023-04-11 at 11 26 50 AM

@Shrinks99
Copy link
Collaborator Author

Shrinks99 commented Apr 11, 2023

@tw4l WCAG2's contrast algorithm notably STINKS! It is wholly unrepresentative of how humans interpret colours, not accounting for hue & other perceptual phenomena when calculating a contrast score. For more information, check out this article with nice examples!

The nav is a great example of this where sRGB white text on sRGB #008873 bg fails WCAG2 but passes APCA for body text — and rightfully so? Looks plenty legible to me.

That said, your point is still valid and through APCA it only gets a "fluent text okay" which isn't ideal considering the weight used here (about 200 off from what the calculator considers accessible). I'm glad you brought this up because when I generated this palette I didn't fully validate it, looks like I need to generate a few middle ground colour values between the light and dark swatches, will probably also lighten the background some to bump the score up, ideally past Lc 70.

As for the nav link opacity reduction, I'll see what I can do... This is kind of a Material for MKDocs accessibility issue and a good example of why I prefer to not use opacity for hover effects!

@tw4l
Copy link
Member

tw4l commented Apr 11, 2023

WCAG2's contrast algorithm notably STINKS! It is wholly unrepresentative of how humans interpret colours, not accounting for hue & other perceptual phenomena when calculating a contrast score. For more information, check out this article with nice examples!

This is great to know, thank you!

As for the nav link opacity reduction, I'll see what I can do... This is kind of a Material for MKDocs accessibility issue and a good example of why I prefer to not use opacity for hover effects!

Makes sense!

Everything else looks good so going to go ahead and approve so you can make the changes as you see fit and merge when ready.

- Nav bar text is now 20% higher opacity, hover state also differentiated with weight
- In-body links are now underlined
- Lightened BG colour and darkened link colour — now achieves an APCA score of 84!
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

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

Nice, the non-white background is good and new icons. Could go either way on font here ;)

@Shrinks99 Shrinks99 merged commit a62a452 into main Apr 14, 2023
@Shrinks99 Shrinks99 deleted the docs-fonts&icons branch April 14, 2023 02:05
@Shrinks99 Shrinks99 restored the docs-fonts&icons branch April 18, 2023 01:11
@Shrinks99 Shrinks99 deleted the docs-fonts&icons branch April 18, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants