Integration of storybook for component library
Setting up a component library could be beneficial for the ORKG. I am currently working on a use case, for the contribution editor, to demonstrate how this works ([2] for a single component).
I believe there are multiple benefits of setting up a component library (we can further discuss this in a meeting). Some benefits:
- Single location to list all components
- Every ORKG team member can see those components, without the need of digging into the codebase
- Component driven design, listing the components makes it easier to actually treat the component as self-contained and modular
- Enforces basic code documentation
- Newcomers to the project have a good overview of the components in the project. It should be straightforward to create new pages from the existing components
Tasks:
-
Add JSDoc for the components #488 -
Integrate storybook and setup the configuration -
Refactor providers to single, reusable component #505 -
Refactor directory structure. I suggest to move to "folder" components. In which each component has it own folder, that contains: 1) the component, 2) tests, 3) story (for story book) [1] -
Integration of Mock Service Worker in storybook, so we can reuse the API mockups that we already created for testing
[1]
[2]