primer / react

An implementation of GitHub's Primer Design System using React
https://primer.style/guides/react
MIT License
3.1k stars 533 forks source link

Component Categorization #754

Closed emplums closed 3 years ago

emplums commented 4 years ago

Right now in Primer Components, we've got many "building block" type components, and also many "pattern" type components.

Right now we call them "pattern" & "helper":

Pattern: Pattern components help us repeat commonly used UI patterns and interactions in order to maintain our brand and provide a great user experience. Some examples of pattern components are Button, Avatar, or Label.

Helper: Helper components are components that help the user achieve common CSS patterns while maintaining some control over values used. Some examples of helper components are Flex, Text, Grid, and the Position components.

emplums commented 4 years ago

Examples in other design systems

Shopify Polaris

Polaris has many categories which seem to be organized by function:

Notes: They've got a repo with example applications built out using their React components which is pretty neat: https://github.com/Shopify/polaris-react/tree/master/examples

Twilio Paste

IBM Carbon

Notes: Carbon seems to not have many "helper" components like position, text, etc

[Theme UI]()

Note: ThemeUI is more of a framework for other design systems to use than a design system itself which might be why it has less "pattern" components and more smaller "helper" style components

Chakra UI

AtlasKit

Notes: AtlasKit components seem to be divided up by product category. Core seems to be most similar to our component library, does not contain helper components. It looks like each component in Core is it's own package.

HP Grommet

Notes: I like how they organize and visualize their components: https://v2.grommet.io/components

Lexicon Design System

Mozilla Protocol

Workday Canvas

emplums commented 4 years ago

Started doing some rough diagramming in Figma: https://www.figma.com/file/6hksZw19FFbqgkDRleYZtF/React-Components?node-id=0%3A1

dmarcey commented 4 years ago

As another example, here is the categorization for the Azure Dev Ops Design system: https://developer.microsoft.com/en-us/azure-devops/components

The high-level categories were:

Then we had another separate section for "Utilities" which were basically components, but not UI components - things like FocusZone or Observer that were used to build complex UIs, but didn't actually produce any DOM themselves.

IIRC, @yaili helped out with this initial categorization, so she would probably be a good person to talk to about these categories!

emplums commented 4 years ago

Oooh I really like these categories @dmarcey! I've been struggling with figuring out where things like Avatar would fit and I like the wording of "Supporting Visuals: for these kinds of things!

yaili commented 4 years ago

I feel that generally components, patterns, and utilities is the simplest way to have some divisions without too many sections.

We divided the Components section of Azure DevOps in categories to be easier to scan, although under the hood they're all components (and in the nav they're all in alphabetical order). 😊

yaili commented 4 years ago

More random thoughts:

github-actions[bot] commented 3 years ago

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.