department-of-veterans-affairs / caseflow

Caseflow is a web application that enables the tracking and processing of appealed claims at the Board of Veterans' Appeals.
Other
54 stars 19 forks source link

Investigate React Component Management Libraries #12009

Closed lomaxap closed 4 years ago

lomaxap commented 5 years ago

Tools like storybook / styleguidist and bit (see others) allow us to create easily shareable directories of react components. We should create a list of all the options and the pros and cons for each.

jcq commented 5 years ago

One major consideration will likely be cost. For instance, while Bit has a free tier, we'd likely need organization account access, which requires the $12/user/mo tier, which may be a tougher sell.

jcq commented 5 years ago

Another thing to investigate: What's the best way to mock some of the larger objects that components might use? If we have a component that takes an appeal as a prop, we should have some standardized way of creating a mock that will properly satisfy that type.

What would be best would be to utilize the existing FactoryBot logic already established on the Rails side to avoid needing to keep multiple generators updated. For instance, Hanger generates an API based on existing Rails factories.

aplybeah commented 5 years ago

Recommendations for React Component Management

Context

Response to #12009. The goal of this investigation is to find tools that will isolate our react components so that we can have a live preview of how the component works, and have directories of components that can be shared between projects.

Overview

The tools considered are Docz, React Styleguidist and Storybook. These were chosen primarily for the level of documentation, price (all are free and open source), and compatibility with React, and the dependencies that we have.

Components Tools In-depth:

Docz

Documentation

Seems to be more of a documentation system/style guide more than a library where components can be shared in between projects. The live preview does auto generate a "basic Usage" page, which is super helpful. However, converting all of the .jsx into .mdx looks like it would be a lot more trouble than it's worth.

Highlights:

React Styleguidist

Documentation React Styleguidist is a management tool that Unlike Docz, can natively read .jsx files as components. It features a live preview that also shows the code that generates a specific component.

React Styleguidist

Highlights:

Storybook

Documentation

Highlights:

jimruggiero commented 4 years ago

@jcq and @lomaxap With #12945 now open, can you clarify what scope remains on this issue? Can this one be closed?

jcq commented 4 years ago

@jimruggiero Sorry for delayed response — yup, this one is good to close out, as we have begun actual implementation from the other ticket. Thanks for checking!