Replies: 4 comments 8 replies
-
I actually like the current Polaris approach. I feel there is too many options and it is not clear when to use each one. The components I could imagine:
I would like to remove or consolidate these:
|
Beta Was this translation helpful? Give feedback.
-
In the spirit of decoupling type styles from semantic elements perhaps we should simply generate CSS classes for each composite type. This would promote composite types being the shared language between design and development and allow implementation details to be platform/framework agnostic e.g. .heading1 {…}
.heading2 {…}
.heading3 {…}
.body1 {…}
.body2 {…}
.caption {…}
.overline {…}
.blockquote {…}
.code {…}
.my-fancy-type {…}
// etc. Regardless of the component architecture we land on we would be able to consume these classes. Additionally, other applications would be able to generate these composite types from our tokens based on their platform and project constraints. |
Beta Was this translation helpful? Give feedback.
-
@tjonx I feel like text falls into two groups: body (paragraph) and headings. I like the idea of grouping in those categories and then using t-shirt sizing. I've been playing around with this idea (this is still rough but gets the concept across):
I'm kind of splitting hairs but I prefer body in this context because within the admin, I think it's rare we write paragraphs of text. That being said I get that it maps to html.
@aaronccasanova I actually think it's really nice for sensible defaults to have maybe a couple components like and . The thing I like about this is I could add and expect to get the default heading style and same with . I agree though I'd like to see both of these prototyped. Feels like there's trade-offs of both. |
Beta Was this translation helpful? Give feedback.
-
Type styles in Figma only go so far. Figma components allow you to put multiple styles together. So this is something I wanted to try out. It's not necessarily the direction we need to or should go but they are easier to override while still having the ability to revert back to Polaris defaults and keeps the connection to the component. I've got the same thing set up with text styles to test out both approaches. With that screenshot I was more illustrating how I was thinking about grouping and naming more than implementation in a given tool. |
Beta Was this translation helpful? Give feedback.
-
In our ongoing Type explorations there has been discussion around revamping Polaris's text components.
Those current components are Caption, DisplayText, Heading, Subheading, VisuallyHidden, TextStyle and TextContainer.
In the past there have been explorations regarding removing some or even just having one Text/Typography component, like in MaterialUI, that would handle the logic of all of the above.
Few things to keep in mind:
Any opinions/gut feelings/preferences on how we implement consistent, clean and easily understandable type on the code side of things?
Beta Was this translation helpful? Give feedback.
All reactions