Open alecdanz opened 3 years ago
Hijacking this thread for a feedback cycle on the new "Foundations - typography" spec as well.
"code-md"
-> code
.Component design feedback:
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.
:focus-visible
)":active
)"aria-expanded
or aria-pressed
)aria-expanded
maps to use of <button>
as a controlling a group of elements, like a menu of items ("Dropdown")aria-pressed
maps to use of <button>
as a "toggle button"medium
.:focus-visible
)"aria-selected
)":focus-visible
):required
) (usually adds an asterisk to the FormLabel):focus-visible
)".aria-selected
)".aria-selected
)"aria-selected
)"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.
Great, thanks y'all 👍🏼
I'll be working on Typography today.
@shadoath is working on the Button (+ IconButton ?).
Working on Link next.
Beginning work on Input (+ InputLabel, InputBase, InputAdornment)
@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>
Hmm. Getting an error when trying to upload that as well.
Want to hop on a call to review?
@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.
Sure. What file specifically? Components?
Yes components
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.