Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further define acceptance criteria for moving components to stable #11688

Closed
1 of 5 tasks
tay1orjones opened this issue Jun 27, 2022 · 2 comments · Fixed by #11881
Closed
1 of 5 tasks

Further define acceptance criteria for moving components to stable #11688

tay1orjones opened this issue Jun 27, 2022 · 2 comments · Fixed by #11881
Assignees
Labels
adopter: PAL Work-stream that directly helps a Pattern & Asset Library. package: @carbon/react @carbon/react role: dev 🤖

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Jun 27, 2022

ContextMenu has been unstable for quite some time. We need to:

  • Revisit what steps/criteria are required to move a component from unstable to stable.
    • Storybook stories need playground, controls, etc.
  • Document the unstable -> stable process in repo
  • Validate the process by going through it with a currently unstable component:
@tay1orjones

This comment was marked as off-topic.

@joshblack
Copy link
Contributor

joshblack commented Jul 6, 2022

Draft

Moving a component to stable

  • All files have a copyright banner
  • All components exported in src/index.js and should not be unstable_ prefixed
  • Component has a label in the github repository
  • Component should be documented on the website
    • Component should have a usage, style, and code tab
    • Component may have a component demo
  • For each component exported:
    • Component is written as a function declaration or uses forwardRef
    • Component has propTypes defined
      • Each prop type has a comment (used in storybook)
      • Prop types are as specific as needed, prefer PropTypes.shape over PropTypes.object if possible
    • Default props are listed as default args in the function definition (not in defaultProps)
      • Note: default props should be stable, in other words props like onClick = () => {} can cause re-renders since the function identity is not stable
    • Component has a story in <ComponentName>.stories.js
      • Component has an mdx document that follows our outline
      • mdx document coverages at least common use-cases and provides a prop table
      • Stories cover at least common use-cases
      • Stories may include a Playground story for controls
      • Stories should mirror intended usage of the component
    • Component has unit/integration tests written in RTL for testing the component API
    • Component is tested via VRT for at least the initial render state
    • Component is tested via AVT for at least the initial render state

@tay1orjones tay1orjones changed the title Further define acceptance criteria for moving components to stable - (ContextMenu) Further define acceptance criteria for moving components to stable Jul 8, 2022
@tay1orjones tay1orjones self-assigned this Jul 18, 2022
@joshblack joshblack removed their assignment Jul 20, 2022
@kodiakhq kodiakhq bot closed this as completed in #11881 Aug 1, 2022
@sstrubberg sstrubberg added package: @carbon/react @carbon/react adopter: PAL Work-stream that directly helps a Pattern & Asset Library. labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: PAL Work-stream that directly helps a Pattern & Asset Library. package: @carbon/react @carbon/react role: dev 🤖
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants