Skip to content
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

fix: Fixed map for crags showing duplicate titles and not showing children on map #953

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

sjsikora
Copy link
Contributor

@sjsikora sjsikora commented Aug 2, 2023


name: Fixed map for crags showing duplicate titles and not showing children on map
about:
title: ''
labels: ''
assignees:


What type of PR is this?(check all applicable)

  • refactor
  • feature
  • bug fix
  • documentation
  • optimization
  • other

Description

Related Issues

Issue #940

What this PR achieves

As the discussion on the issue pointed out, the map is intended to label the main area of the page and label all the sub-areas on the map. Currently, it does not do that; it writes the main title twice on the map.

To fix this, I modified the query parameters (areaById) to send back the lat and long metadata of the sub-areas. Then, I fixed the map logic to write the sub-areas on the map and ensured the main area label was not written twice.

Screenshots, recordings

Current:
image

After fix:
image

Notes

The style of the labels may be want to be modified.

There also seems to be logic to change the color of labels based on variables "focused" and "selected." I left these, but they will not be used because the focus is set to null, and selected is the main area.id, which will never be equal to a subarea id.

            ${subArea.id === props.focused ? 'bg-green-500 text-white scale-125' : ' bg-white'}
            ${subArea.id === props.selected ? 'bg-violet-500 text-white scale-125' : ' bg-white'}`}

@vercel
Copy link

vercel bot commented Aug 2, 2023

@sjsikora is attempting to deploy a commit to the openbeta-dev Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Aug 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
open-tacos ✅ Ready (Inspect) Visit Preview Aug 2, 2023 3:06am

@vnugent
Copy link
Contributor

vnugent commented Aug 2, 2023

@sjsikora thanks so much for reviving the map feature!

@vnugent vnugent merged commit 8837d6e into OpenBeta:develop Aug 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants