ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.14k stars 389 forks source link

feat: update map pin clusters #3855

Open benfurber opened 1 month ago

benfurber commented 1 month ago

Description

Add a shadow effect to the map pin clusters which changes based on the size of the cluster

Mockup and design requirements

Clusters use the primary color of the instance (Project Kamp, Precious Plastic and Fixing fashion). The range of the size for the cluster shadow ranges from 2 (where the shadow is small) to 50 (where the shadow is bigger). Even if the number grows above 50, the shadow should not exceed the maximum spread, otherwise I imagine that on a low zoom level.

image

I have applied the following box-shadow properties (X: 0, Y: 0, blur: 2px, spread varies from 4px to 24px). The color is the main color with 50% opacity. The color of the pins should be configurable and can change if a future decision will be made for the color schemes of the map.

image

Build suggestion

The function to update is createClusterIcon and getClusterSizes in src/pages/Maps/Content/MapView/Sprites.tsx

6pBit commented 1 month ago

Hi first time here:) I like to try to solve this issue.

benfurber commented 1 month ago

Welcome @6pBit! Please shout when you have questions.

benfurber commented 2 weeks ago

Hey @6pBit - how are you getting on?

6pBit commented 2 weeks ago

Been a bit busy the last weeks, but im going to make time to work on it this weekend:)