-
Notifications
You must be signed in to change notification settings - Fork 0
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
EDA Map Refactor: Introduce MapType plugin and implementations #424
EDA Map Refactor: Introduce MapType plugin and implementations #424
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.
This looks great. The diff's a bit confusing but I browsed the code and the relocation of the marker logic makes perfect sense. Is there anything specifically "dodgy" you want feedback on?
The stories all work fine - animations, flyTo etc.
If the animations look good, I'm happy. I cleaned up some useEffect hooks in SemanticMarkers, and ran into some animation issues with zooming in, at first. They should all be resolved now. I plan to continue working on this branch. Next, and hopefully last, up is implementing the new MapTypePlugins. |
…ariable-map-type--map-type-refactor
…ariable-map-type--map-type-refactor
…' into map-collection-variable-map-type--map-type-refactor
- Remove `getData` from `MapTypePlugin` interface - Utilize react-query to cache network requests - Move constants from index module, to prevent circular imports
…ariable-map-type--map-type-refactor
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.
Should constrainLongitudeToMainWorld
in SemanticMarkers be called from somewhere?
Ah... I see it has moved to MapVEuMap.tsx https://github.com/VEuPathDB/web-monorepo/pull/424/files#diff-67456b6e516de477c34a0a21ba3c750d25463bbc48e5059a0fe59bb8c44941efR465
So it looks like the SemanticMarkers version can be removed.
That's my review of the components part done. It's code-approved but pending testing. I'm going to submit this as a comment and review the eda side after lunch! I recently lost a big github issue draft so don't want the same to happen to my review.
Thanks for the review, @bobular. I will remove those out-of-date things. |
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.
Been through all the eda code and approve in principal but would like to test tomorrow ideally. Especiallly figure out the flyTo stuff.
)} | ||
/> | ||
</Switch> | ||
<ReactQueryDevtools initialIsOpen={false} /> |
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.
Does this stay in for ever? Was it true
a week ago when I last tested?
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.
Good question. This has been false
since I added it. The docs say that this will not appear in prod builds (>= qa). It can be useful, but the icon could get in the way, I suppose.
Related: it might make sense to move react-query to wdk-client or web-common.
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.
Yeah, I was wondering about the flower icon. Fingers crossed it goes away in prod - otherwise an easy fix!
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.
We'll know pretty quickly, since qa sites use a "prod" build
packages/libs/eda/src/lib/map/analysis/MarkerConfiguration/PieMarkerConfigurationMenu.tsx
Outdated
Show resolved
Hide resolved
packages/libs/eda/src/lib/map/analysis/mapTypes/plugins/BarMarkerMapType.tsx
Outdated
Show resolved
Hide resolved
packages/libs/eda/src/lib/map/analysis/mapTypes/plugins/BubbleMarkerMapType.tsx
Show resolved
Hide resolved
Hi @dmfalke - I did some testing and thought we had to bring back the old (but flawed) flyto trigger until we fix it in the way you suggest in this PR's description. The problem was that the user might want to zoom out to zoom level 1 without it automatically zooming back in again. See my suggestion here --> #566 |
…tion Bring back old FlyTo behaviour for now
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.
I tested today and I'm sure there will be some rough edges to smooth (including handling of empty results which I am on the case for) but it's working great and I suggest we go for merge!
I think the header's |
* Restructure side menu to allow for subheadings. (#398) Changes include: - Variable renaming - Modifications to finding active menu item and active map type - Extracting some components * Some additional clean-up (#401) * Move active viz to realm of map type config, and clean up some labels and ids. * Have the active map type config panel open by default * Remember whether side panel is expanded on subsequent page loads * Remove unused app state property * EDA Map Refactor: Introduce MapType plugin and implementations (#424) * Remove marker-related props from MapVEuMap * Move onBoundsChange logic to MapVEuMap; clean up SemanticMarkers hooks * Extract getDefaultAxisRange function * Move DraggableLegendPanel to its own module * Move defaultAnimation to its own module * Extract bubble overlay config into its own function * Add MapType plugins * Wire up MapType plugins * Use plugin displayName in menu * Reduce props passed to getData * Checkpoint commit using @tanstack/query * Incorporate additional changes from merge * Checkpoint - Remove `getData` from `MapTypePlugin` interface - Utilize react-query to cache network requests - Move constants from index module, to prevent circular imports * Add TODO * Propagate selected values for marker configuration to overlay config * Remove TODO * Keep previous query data; use isFetching status to show spinners for maker data * Introduce `MapTypeHeaderDetails` to `MapTypePlugin` * Remove unused type * Crudely reimplment "flyToData" * Pass valueSpec to standalone map markers * Remove out of date comments and code * Remove old comments * Move shared interface to shared file * Use destructured variables * bring back old behaviour for now --------- Co-authored-by: Bob <uncoolbob@gmail.com> * Post-merge updates * Post-merge updates, 2 * Fix filter button in header * remove file --------- Co-authored-by: Connor Howington <connor.howington@gmail.com> Co-authored-by: Bob <uncoolbob@gmail.com>
See #106
This PR introduces the MapType plugin concept, and implementations for donut, bar, and bubble map types.
Some follow-up tasks that we might consider:
TODO:
MapVEuMap
componentMapTypeHeaderDetails
component for rendering countsflyToMakers
logic in each MapType