You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue tracks the work needed to develop a new system of behaviors in Primer React Components. This idea was proposed by @T-Hugs in https://github.com/github/design-systems/issues/1178 and further brainstormed during our ramp week (see notes here: ). As a result of our ramp up week session, we've decided to move forward with building a collection of React Hooks that can provide behaviors to our Primer React Components and also be imported individually.
One change in strategy to note is that we still intend to ship PRC components with these hooks initialized automatically (vs some of the approaches mentioned in #1178 suggesting shipping PRC without behaviors and expecting consumers to initialize behavior hooks themselves).
Part of this workstream also includes creating guidelines to follow for building out highly reusable components with behaviors, and suggesting some common API patterns to use when doing so. Right now in PRC, we use a mixture of managing state, letting consumers manage state, render props patterns, hook behavior patterns, etc. A deliverable of this workstream should be to standardize our approach to building behavioral components so that engineers contributing to PRC know exactly how to build a great component + consumers of the library know what to expect in terms of behavior APIs and state management.
Steps
Create engineering guidelines for how behaviors should work in PRC so that behaviors are consistent across components
When should we manage state vs let consumers manage state vs a mix of both
What event handlers & state change hooks should generally be provided
Adding in ref forwarding
General guidelines for making a component reusable
The result of this work should be a new markdown document in this repo
Create prioritized list of behaviors
Should take into account needs from other teams using PRC at GitHub
Involves meeting with engineers from other teams to gather feedback for prioritization
Lift behaviors from Memex into Primer Components
Implement new needed behaviors
Refactor old behaviors to follow new system
List of components with behaviors in PRC currently:
Resources need + scope
This workstream should be considered continuous throughout the year as we add more and more behaviors to PRC, but a generic breakdown of scope involved is as follows:
Create engineering guidelines
1 week of research & writing guidelines for 2 engineers collaborating together, plus input from engineers across DS, UI Frameworks & Memex during the review process.
Create prioritized list of behaviors
2-3 days of work from 1-2 engineers
Lift behaviors from Memex into Primer Components
1-2 weeks of work, for 2-3 engineers + more resources needed for reviews
Implement new needed behaviors
The scope of this depends on the list of behaviors needed created in Step 2. I imagine this chunk of work to be an ongoing effort throughout the quarter + year as we continue to add more and more behaviors
Refactor old behaviors to follow new system
The text was updated successfully, but these errors were encountered:
Description
This issue tracks the work needed to develop a new system of behaviors in Primer React Components. This idea was proposed by @T-Hugs in https://github.com/github/design-systems/issues/1178 and further brainstormed during our ramp week (see notes here: ). As a result of our ramp up week session, we've decided to move forward with building a collection of React Hooks that can provide behaviors to our Primer React Components and also be imported individually.
One change in strategy to note is that we still intend to ship PRC components with these hooks initialized automatically (vs some of the approaches mentioned in #1178 suggesting shipping PRC without behaviors and expecting consumers to initialize behavior hooks themselves).
Part of this workstream also includes creating guidelines to follow for building out highly reusable components with behaviors, and suggesting some common API patterns to use when doing so. Right now in PRC, we use a mixture of managing state, letting consumers manage state, render props patterns, hook behavior patterns, etc. A deliverable of this workstream should be to standardize our approach to building behavioral components so that engineers contributing to PRC know exactly how to build a great component + consumers of the library know what to expect in terms of behavior APIs and state management.
Steps
Lift behaviors from Memex into Primer Components
Implement new needed behaviors
Refactor old behaviors to follow new system
List of components with behaviors in PRC currently:
Resources need + scope
This workstream should be considered continuous throughout the year as we add more and more behaviors to PRC, but a generic breakdown of scope involved is as follows:
Lift behaviors from Memex into Primer Components
1-2 weeks of work, for 2-3 engineers + more resources needed for reviews
Implement new needed behaviors
The text was updated successfully, but these errors were encountered: