-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade deps, add storybook #4947
Conversation
@@ -30,9 +30,6 @@ | |||
"d3": "^7.9.0", | |||
"dayjs": "^1.11.7", | |||
"iframe-resizer": "^4.3.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should have been removed when we moved to esbuild. Modern phoenix config wants these JS packages to be resolved via mix ../deps
folder but our package.json was actually shadowing the same deps in ./node_modules
.
By removing from node_modules we have less config and guaranteed that the frontend package has the same version as the backend one.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool work 👏.
CI failures aside, I think this could benefit from being a MIX_ENV=dev
-only dependency/runtime. Or do you intentionally want to run it on prod servers? IMHO it's unnecessary build clutter for prod images.
I've tried looking into the Alpine misbehavior, but Alpine-specific setup you did seems a-OK.
About that - the new HeeX engine wants us to convert all the templates from
Yeah it feels like a dev thing to me as well but there were a couple points that made me include it in docker builds:
Maybe just including in preview builds would be a good solution for now. But since preview builds are also made with Anyways - I definitely think having storybook in preview environments is useful but I'm agnostic about prod. Given all that - do you think we should exclude from prod at runtime? |
I think being able to view the storybook without running the app locally is an important part for its adoption: when following the storybook is inconvenient, it's unlikely to help in unifying user experience within the app. That said, I'd also be wary of exposing it from prod servers: as I see it, the increase in attack surface / ways for our prod servers to fail is not worth the convenient plausible.io/storybook URL. Have it on staging? |
27b0a6e
to
fb8dbe3
Compare
I've pushed the large PS: Merging this will likely cause conflicts with other PRs that change templates |
50501aa
to
81f096d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All seems to work as expected in the review env.
81f096d
to
6f5df63
Compare
Changes
Adds phoenix storybook dependency along with example pages for dropdowns and basic inputs. In order to make it work I had to upgrade some deps:
There were some breaking changes which I'll take notes on in self-review
There are a couple known issues with storybook installation:
./storybook
) uses its own JS bundle which is using pre-1.0 version of liveview. This causes a console warning but no real-world issues as far as I can tell. A new version of storybook should be released this week with support for Liveview 1.0