From efb53593ce350ec72ef5c180d151f0c0f2f69e1d Mon Sep 17 00:00:00 2001 From: Viet Nguyen <3805254+vnugent@users.noreply.github.com> Date: Wed, 29 May 2024 06:14:51 -0700 Subject: [PATCH] Data layer toolbar (#1135) * unidfy crag & boundary components * close hover card when drawer is active * data layer toolbar --- package.json | 4 +- .../recent/RecentContributionsMap.tsx | 2 +- src/app/(maps)/components/ProfileMenu.tsx | 2 +- src/components/core/Card.tsx | 2 +- src/components/maps/AreaActiveMarker.tsx | 39 ++---- src/components/maps/AreaInfoDrawer.tsx | 72 ---------- src/components/maps/AreaInfoHover.tsx | 68 --------- src/components/maps/CardGallery.tsx | 8 +- src/components/maps/GlobalMap.tsx | 132 +++++++++++------- src/components/maps/MapLayersSelector.tsx | 4 +- src/components/maps/MapSelector.tsx | 12 +- src/components/maps/MapToolbar.tsx | 43 ++++++ src/components/maps/OBCustomLayers.tsx | 129 ++++++++++++----- .../maps/TileHandlers/AreaContent.tsx | 71 ++++++++++ .../maps/TileHandlers/CragContent.tsx | 74 ++++++++++ src/components/maps/TileHandlers/Drawer.tsx | 58 ++++++++ .../maps/TileHandlers/HoverCard.tsx | 60 ++++++++ src/components/maps/TileTypes.ts | 59 ++++++++ src/components/maps/utils.ts | 62 ++++++-- yarn.lock | 40 +++--- 20 files changed, 637 insertions(+), 304 deletions(-) delete mode 100644 src/components/maps/AreaInfoDrawer.tsx delete mode 100644 src/components/maps/AreaInfoHover.tsx create mode 100644 src/components/maps/MapToolbar.tsx create mode 100644 src/components/maps/TileHandlers/AreaContent.tsx create mode 100644 src/components/maps/TileHandlers/CragContent.tsx create mode 100644 src/components/maps/TileHandlers/Drawer.tsx create mode 100644 src/components/maps/TileHandlers/HoverCard.tsx create mode 100644 src/components/maps/TileTypes.ts diff --git a/package.json b/package.json index 6fc3112e5..b7bf837cc 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@lexical/react": "^0.7.5", "@math.gl/web-mercator": "3.6.2", "@openbeta/sandbag": "^0.0.51", - "@phosphor-icons/react": "^2.0.14", + "@phosphor-icons/react": "^2.1.5", "@radix-ui/react-alert-dialog": "^1.0.0", "@radix-ui/react-dialog": "^1.0.0", "@radix-ui/react-dropdown-menu": "^2.0.1", @@ -48,7 +48,7 @@ "immer": "^10.0.2", "lexical": "^0.7.5", "mapbox-gl": "^2.7.0", - "maplibre-gl": "^4.1.1", + "maplibre-gl": "^4.3.2", "nanoid": "^4.0.0", "nanoid-dictionary": "^4.3.0", "next": "^13.5.6", diff --git a/src/app/(default)/components/recent/RecentContributionsMap.tsx b/src/app/(default)/components/recent/RecentContributionsMap.tsx index 067bb5c68..0a0e83845 100644 --- a/src/app/(default)/components/recent/RecentContributionsMap.tsx +++ b/src/app/(default)/components/recent/RecentContributionsMap.tsx @@ -87,7 +87,7 @@ export const RecentContributionsMap: React.FC<{ history: ChangesetType[] }> = ({
{ return ( -
+