Refactor hardware
Following !690 (merged), here is close to the same for the daiquiri hardware.
Now the idea is to use an index.ts
to expose the component.
- Each component have a dedicated directory
- The directory contains a
index.ts
- This expose always a variant component + the schema type
- The react component is usually named such as
Optic.tsx
, but dont have to be imported externally because of the index
Notice that there is some components with or without schema/mock/react-component.
Proposal for next step
I suggest to move the hardware from src/components
to src/hardware
as kind of first class citizen (guessing src/components
is mostly for graphical components).
A hardware is not only a graphical components it also share types, utils... what ever.
The remaining code in src/components/hardware
will only handle the mount of generic hardware. This will create a cleaner architecture.
Proposal for doc
I also definitely suggest to move back the mdx together with each hardware, even if we create a mdx
or doc
directory.
For trustable components, everything should be together. It's just easier to maintain.