-
Notifications
You must be signed in to change notification settings - Fork 6
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
Abstract Away Faux Modules from MapBlock Component and make renderable for NextJs Instance Prototype #1046
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for putting various works on making the component work with the NEXT instance. I could see how it was unavoidable to make multiple changes when making changes for the component library. Once we are clear on what needs to be done, can we make the changes more gradually? I see there are several kinds of changes here.
How does this sound? |
import { Map as MapboxMap } from 'mapbox-gl'; | ||
import { MapRef } from 'react-map-gl'; | ||
import { endOfDay, startOfDay } from 'date-fns'; | ||
import startOfDay from 'date-fns/startOfDay'; | ||
import endOfDay from 'date-fns/endOfDay'; |
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.
Parcel build for library was unable to find these date-fns if it wasn't imported like this... So had to switch over to doing this. Seems to be an open issue with Parcel
parcel-bundler/parcel#9676
👋 I could narrow down what component leads to a build failure by commenting out the components we are exporting gradually. I could check that the build only fails when When we look at the error log with Mapblock, there are several kinds of errors. To point out the most suspicious one:
I suggest reviewing BlockMap's dependencies to ensure it is completely independent from the faux module. Then, we can see if other errors still interrupt the library build. Also, it might be worth merging the main branch since some major updates of Parcel went into the main recently! |
29a313d
to
ed87f13
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.
The changes look good to me, and I also tested the Stories, Scrollytelling, Datasets and E&A and couldn't spot any issues.
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.
Yay, thanks for the work 🙇
I could also export CatalogView
component without problem on this branch. I am excited for the next step!
**HOLD until we merge #1073 ## 🎉 Features * Added Announcement component using USWDS Design System and adding purge-css #1031 ## 🚀 Improvements * Add logic for tracking out-of-view Timeline playheads for E&A page #1067 * Abstract Away Faux Modules from MapBlock Component and expose as library component #1046 ## 🐛 Fixes - 🦗
Related Ticket: #1002
These changes are RELATED TO THIS PR: developmentseed/next-veda-ui#1
Description of Changes
This makes the MapBlock component renderable by the NextJs instance by abstracting away the veda faux modules dependencies. This also exports the themeProvider and reactQueryProvider to be used by the nextJs instance.
I've tried to keep these changes quite isolated to the problem we are trying to solve so its not too big of a PR.
Notes & Questions About Changes
Validation / Testing