This repository has been archived by the owner on Jul 19, 2022. It is now read-only.
WIP: Prototype of UI component catalog/design system with elm-ui-explorer #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
I've set up elm-ui-explorer for the project and added a few stories for Button, Tooltip and Modal.
The UI Explorer can be started with
npm run uie
and is then available on http://localhost:1235Adding static components is straightforward, but adding interactive components seems rather cumbersome since the model and update function are global for all components.
One example where some interactivity is necessary is the Modal story: Simply rendering the modal component statically (as it is done now) makes the UI unusable because the modal dialog cannot be closed.
So in all, I'm not completely convinced this will add enough value. But since I spend some time getting it running, I created the PR as a basis for discussion.
Implementation notes
I use webpack to run the UI Explorer instead of elm-live that comes with
elm-ui-explorer
to reduce the number of new dependencies. I kept the webpack configuration very similar towebpack.dev.js
Loose ends
The changes in package-lock.json seem massive, it might be worth investigating if we want to continue with this PR