Fix some deficiencies in pattern-library layout (as quickly as feasible) #976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
After which it:
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:
After:
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:
After:
After, with source panel active:
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
Example
components is still indented;Example
headings are underlined to set off this indent.Reduction of "Usage" noise
The "Usage" heading used on most pattern-library pages was in most case just visual noise. Updated
Pattern
component to maketitle
optional and removed "Usage" headings in most, but not all, cases.Before:
After: