-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Summary
I propose using Storybook (or something like it) to develop and test the UI components in isolation without the need for the actual program logic to be in place.
Motivation and Context
We have a candidate architecture/implementation for the server and shared client application logic on the v1.5/main branch. On that branch it is driving the CLI, TUI, and a modified version of the v1 web app.
This code is all new, and so we need to explore it, test it, refactor it, etc to gain confidence in its applicability to the v2 effort.
Meanwhile we want to make concrete progress on the v2 UI without having to build "stand-in logic" or rush the integration of the InpsectorClient. The presentational components approach decouples the component from its logic. Allowing us to focus on the look and feel separately from the functionality.
The idea is that a component receives everything it needs through props — the data it renders and the callbacks it fires when the user interacts. The component itself has no idea where the data came from or what happens when a button is clicked. It just calls onSave(formData) and trusts that someone upstream is handling it.