Skip to content

Commit

Permalink
feat: update map filtering display for usability
Browse files Browse the repository at this point in the history
  • Loading branch information
benfurber committed Dec 5, 2024
1 parent 812c38e commit 0c92b75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
16 changes: 11 additions & 5 deletions packages/components/src/MapFilterList/MapFilterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const MapFilterList = (props: IProps) => {
const isActive = (checkingFilter: string) =>
!!activeFilters.find((filter) => filter.label === checkingFilter)

const buttonLabel = `Show ${pinCount} result${pinCount === 1 ? '' : 's'}`
const buttonLabel = `${pinCount} result${pinCount === 1 ? '' : 's'} in current view`

return (
<Flex
Expand All @@ -61,9 +61,15 @@ export const MapFilterList = (props: IProps) => {
padding: 2,
}}
>
<Heading as="h3" variant="small">
So what are you looking for?
</Heading>
<Flex sx={{ flexDirection: 'column' }}>
<Heading as="h3" variant="small">
Filter what you see
</Heading>

<Text variant="quiet">
Zoom out on the map to search the whole world
</Text>
</Flex>

<ButtonIcon
data-cy="MapFilterList-CloseButton"
Expand Down Expand Up @@ -112,7 +118,7 @@ export const MapFilterList = (props: IProps) => {

{tagFilters.length > 0 && (
<Flex sx={{ gap: 1, flexDirection: 'column' }}>
<Text>Activities</Text>
<Text>Spaces activities</Text>
<MapFilterListWrapper>
{tagFilters.map((typeFilter, index) => {
const onClick = () => onFilterChange(typeFilter)
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Maps/Maps.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const MapsPage = () => {

const pinDetails = allPins.map(({ creator }) => [
creator?.profileType,
...(creator?.tags ? creator.tags.map(({ _id }) => _id) : []),
// Hiding member tags for the moment
...(creator?.tags && creator?.profileType !== 'member'
? creator.tags.map(({ _id }) => _id)
: []),
...(creator?.badges
? Object.keys(creator?.badges).filter((key) => key)
: []),
Expand Down

0 comments on commit 0c92b75

Please sign in to comment.