Skip to content

Conversation

@emplums
Copy link

@emplums emplums commented Aug 16, 2019

This PR adds a Core Concepts doc to have a quick page that goes over some of the core concepts of Primer Components and practices that are often overlooked.

@emplums emplums changed the title 5 Things You Need to Know Core Concepts docs Aug 16, 2019
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! 💯 Left a few questions 😄



## Responsive props
It's really easy to set different values for most of our component props based on screen size! We take advantage of [styled-system](https://github.com/styled-system/styled-system)'s responsive props API in our components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of our component props

Aren't all system props responsive?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All system props are, not all component props

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clarify that all systems props are responsive here?

Also, are any non-system props responsive?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No non-system props are responsive

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't really an easy way to let a user know which props are "system props" and which aren't - that's why I intentionally left this vague.


We categorize our components into 3 general types. Building block components, pattern components, and helper components. Understanding how these types of components interact with each other can help you better understand how to get the most out of Primer Components.

- Building Blocks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between "building block" components and "helper" components is still a little fuzzy to me. I'm curious to hear what @broccolini thinks about these categories.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building block components are components that represent really small pieces of UI vs helper components which don't always render anything visually, but main purpose is to standardize usage of tricky parts of the CSS API. I think it's an important distinction, but as I mentioned in show n tell, sometimes there can be some grey area, which is OK in my opinion!

Emily and others added 4 commits August 16, 2019 14:14
@emplums emplums merged commit ccf26ac into master Aug 19, 2019
@emplums emplums deleted the responsive branch August 19, 2019 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants