-
Notifications
You must be signed in to change notification settings - Fork 4
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
User features - saved locations #260
base: main
Are you sure you want to change the base?
Conversation
This is linked to UW-Macrostrat/macrostrat#105 |
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.
Looks broadly good, but there are some improvements that could be made.
@@ -129,6 +131,13 @@ function useMapLocationManager(): [MapPosition, PositionBuilder] { | |||
(position: mapboxgl.LngLat | null, map: mapboxgl.Map | undefined) => { |
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.
You should try using the map location management hooks/components from the @macrostrat/mapbox-react
module.
@@ -79,6 +80,7 @@ export function Page() { | |||
mapboxToken: mapboxAccessToken, | |||
mapPosition: inspectPosition, | |||
bounds: [-125, 24, -66, 49], | |||
onMapLoaded: (map) => setMapInstance(map), |
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.
This shouldn't be necessary: if you make the panels that require a map reference into separate components, you can get a reference to the map using the useMapRef
hook from @macrostrat/mapbox-react
. This will only work if it's a separate component within the one that contains the MapAreaContainer
.
@@ -41,7 +41,7 @@ | |||
max-width: 180px | |||
|
|||
select |
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.
Try using BlueprintJS form components to blend in with the style of the rest of the application
Updates:
TODO: