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

Fix some deficiencies in pattern-library layout (as quickly as feasible) #976

Merged
merged 4 commits into from
Apr 21, 2023

Conversation

lyzadanger
Copy link
Contributor

@lyzadanger lyzadanger commented Apr 21, 2023

There have been some (understandable) comments that typography, rhythm and layout in the pattern library could be improved. This PR attempts to makes some fixes in a tight pass, without getting too sucked in to the infinite revision cycle that design can be!

Consider this the "version-6 quick design pass." You're welcome to pull this branch and tool around a bit and see how it feels.

This PR:

  • Fixes wonky margins and spacing in many cases
  • Simplifies the visual layout for several library components, including demo/code views
  • Makes color usage consistent and moves away from using application colors (except for brand red) in library interfaces
  • Simplifies typography and makes it more consistent (weights, spacing, color)

After which it:

  • Fixes a couple of stray wonky margins on specific pattern-library pages
  • Removes the noisy "Usage" header on most pages to tighten up layout

Disclaimer: There is a bunch of stuff to follow up on here in the design world. But I'm trying to make the smallest diff possible while still addressing the critical items.

Fixing margins and spacing

I was relying too much on tailwind's space-y-<spacing> classes and they just can't meet the layout needs I was demanding of them. Instead, there is more direct control of margins in several places.

Before:

image

After:

image

Simplifying demo layout

Demo panels are more clearly delineated but with less border/background complexity to snag the eye. Instead of having two buttons for toggling between demo and source, use a single, quieter toggle icon-only button.

Before:

image

After:

image

After, with source panel active:

image

Color updates

Headings use colors from Tailwind's slate family; body text uses colors from Tailwind's stone category. (Tailwind colors). The slate family is similar to our application slate colors but is more obviously blue. Stone is a warmer grey than our grey families and, I feel, offsets the coldness of the rest of the interface. The interface still uses brand-red for links and a few accents. None of these are dramatic changes.

Typography updates

  • There are now only two sizes of body text: the rather-huge page intro text and everything else.
  • There are now fewer indents. Content in Example components is still indented; Example headings are underlined to set off this indent.
  • Leading (line-height) was loosened and made consistent across all body text.

Reduction of "Usage" noise

The "Usage" heading used on most pattern-library pages was in most case just visual noise. Updated Pattern component to make title optional and removed "Usage" headings in most, but not all, cases.

Before:

image

After:

image

@lyzadanger lyzadanger requested a review from acelaya April 21, 2023 13:39
@@ -158,7 +162,7 @@ export default function PlaygroundApp({
>;
return (
<Router base={baseURL}>
<main className="max-w-[1200px] mx-auto">
<main className="max-w-[1250px] mx-auto">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a little more space for body content...

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #976 (319934d) into main (746f12f) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #976   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           52        52           
  Lines          671       671           
  Branches       230       230           
=========================================
  Hits           671       671           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

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

👏🏼

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.

2 participants