-
Notifications
You must be signed in to change notification settings - Fork 29
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
Reusable movable modal #1674
Reusable movable modal #1674
Conversation
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.
Unfortunately I could not get this to build. To test it out I removed node_modules
and did a fresh yarn install
, followed by a yarn build
at the root level. The build works fine until getting to the @zooniverse/fe-content-pages
where I see the window is not defined
error.
Does this match the original error, or is there something I could be doing incorrectly in preparing the build?
@wgranger that's annoying. I thought it was working w/ 10.1.0. I locked it to 10.0.0 which locks react-draggable to v3.x instead of 4.0.3 (which I had thought worked). Try it again and also double check the react-draggable version is v.3.x by using |
I've tried
on this branch, then @wgranger the packages have to be built in a certain order, so make sure to run the bootstrap script first, to build the app dependencies, before building the apps. |
Here's my local setup.
So react components uses version 3 but content pages uses 4, via the storybook? |
@eatyourgreens yeah, storybook uses it, but client side, so it doesn't error like the next.js apps did with >4.x for react-draggable. I think the latest version might work, but react-rnd hasn't updated yet. Could issue a PR for that at another time. |
* Swap out for reusable component. Minor UI fix to MovableModal * Switch test to pending temporarily
I merged #1676 into this which is approved by @shaunanoordin |
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 good. Running yarn panic-button
and yarn bootstrap
first put things in order. This is building fine and still functions as expected on Storybook
Please request review from
@zooniverse/frontend
team. If PR is related to design, please request review from@beckyrother
in addition.Package: lib-react-components
Describe your changes:
The heart of this was already approved in #1661, but it was reverted because it was breaking the next.js app builds with a
window
is not defined error when building for SSR. After nearly two days of debugging, I found that the issue was withreact-draggable
, a dependency ofreact-rnd
. It seems the likely culprit is what was described in react-grid-layout/react-draggable#472. It appears this has been patched, but I can't 100% confirm this because I couldn't figure out how to successfully getreact-rnd
to use an updated version ofreact-draggable
using yarn resolutions in the workspace. I can get the builds to work again by lockingreact-rnd
to version 10.1.0, which is not a longterm solution, but works for now.Please do check that the builds are working for you either using
yarn build
ordocker-compose -f docker-compose-prod.yml build --pull
Review Checklist
General
Components
Apps
yarn panic && yarn bootstrap
ordocker-compose up --build
and app works as expected?Publishing
Post-merging