prenda-school / design-system

Implementations of the Prenda Design System (PDS).
https://main--60b7f55f55fbd4004993da4c.chromatic.com
Other
7 stars 1 forks source link

[umbrella] New design system components #350

Open alecdanz opened 3 years ago

alecdanz commented 3 years ago

Simple components

Simple components are thought of as components that just reference foundational design system elements such as colors and type.

Complex components

Complex components are thought of as components that will reference other components inside of them.

WilliamKelley commented 2 years ago

Hijacking this thread for a feedback cycle on the new "Foundations - typography" spec as well.

  1. Specification for "Code" variants have been removed in PDS v2. Was this intentional? From the deprecated file / old mapping, it is not clear. I would advocate for keeping at least one variant: "code-md" -> code.
  2. The "T32" variant is described for use as "top level headers", and "T28" for "main titles...typically h1". Can you clarify the difference between a "top level header" and a "main title / h1"? My intuition says they're identical.
WilliamKelley commented 2 years ago

Component design feedback:

Preface

Several feedback items come back to defining "states" for a component too liberally. "States" should correspond either to a valid pseudo-class for the component role or a some ARIA-based, stateful attribute (see ARIA guidance for "button" role).

To make this clear in component specs, I believe the "state" should details its corresponding pseudo-class or ARIA attribute that it's targeting. If one cannot be given, then it will probably not lead to a valid implementation, but there's exceptions for everything. For example: "Hovered (:hover), Focused (:focus-visible), Pressed (:active), Disabled (disabled), "Expanded" (aria-expanded).

Several component specs reference "icons" or other elements like they'll be interact-able by default, but this is not the case. A close icon needs to be an instance of an IconButton, referencing the full specification, or else it won't have the full styling and implementation as needed.

alecdanz commented 2 years ago

Thanks for the thorough work William! Meeting with Spence today and we're going to start addressing these inside figma. I'll drop a comment in here if there is anything that needs more discussion.

I added a type for code as suggested to the foundations file - just one size as suggested 👍

For the T28 and T32 example T28 is a more traditional page header and T32 would be used more for the empty state and as an optional emphasis header. It's a little hard to describe but that's the best that I can do.

WilliamKelley commented 2 years ago

Great, thanks y'all 👍🏼

WilliamKelley commented 2 years ago

I'll be working on Typography today.

@shadoath is working on the Button (+ IconButton ?).

WilliamKelley commented 2 years ago

Working on Link next.

WilliamKelley commented 2 years ago

Beginning work on Input (+ InputLabel, InputBase, InputAdornment)

WilliamKelley commented 2 years ago
WilliamKelley commented 2 years ago

@alecdanz @ssbittle For components like the Tag that have a custom SVG icon in their design spec, we should isolate that element in the spec and treat it as a component. (doesn't have to have its own page, I mean a Figma component -- something we can iterate on in isolation and have all its copies update in sync)

I noticed when exporting the Tag's cross that it was weirdly large in file size. I'm amateur at best at Figma SVG manipulation, so I couldn't figure how to fix it, so instead I copied the cross from Anron Icons, and adjusted it to match the Tag's cross exactly. It amounts to a 76% size reduction. I can't seem to upload the file here, but you can copy-paste this into a .svg file in text pad and upload it to Figma.

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
  <path fill="#253858" d="M7.293 7.293a1 1 0 0 1 1.414 0L12 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414L13.414 12l3.293 3.293a1 1 0 0 1-1.414 1.414L12 13.414l-3.293 3.293a1 1 0 0 1-1.414-1.414L10.586 12 7.293 8.707a1 1 0 0 1 0-1.414Z"/>
</svg>
alecdanz commented 2 years ago

Hmm. Getting an error when trying to upload that as well.

Want to hop on a call to review?

WilliamKelley commented 2 years ago

@alecdanz Now that I think of it that's actually the optimized export as well. Maybe it's best if i just get edit access to the file to copy-paste the figma asset.

alecdanz commented 2 years ago

Sure. What file specifically? Components?

WilliamKelley commented 2 years ago

Yes components