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

Hides extra map elements #1060

Merged

Conversation

DonovanAndrews300
Copy link
Contributor

Description

This PR removes the map scale on the bottom left of the property map and hides the map attribute on the bottom right of the map by default. Addresses (Issue#1022)


Steps to Test

  1. Navigate to the Property Map
  2. You should not see the map scale on the bottom left corner of the map just the map legend
  3. The attribution on the bottom right should be hidden when the application loads

Screenshots

Screenshot from 2024-12-18 11-23-06

Copy link

vercel bot commented Dec 18, 2024

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

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 29, 2024 4:15pm

@nlebovits
Copy link
Collaborator

@CodeWritingCow can we get a PR review?

'.maplibregl-ctrl-attrib-button'
);
if (attributionButton) {
attributionButton.click();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DonovanAndrews300 TypeScript is throwing an error saying that click doesn't exist on Element

@CodeWritingCow
Copy link
Collaborator

CodeWritingCow commented Dec 27, 2024

Hi @DonovanAndrews300 I ran your PR's code locally on my computer, and the UI works as expected. The map scale is not shown, and the attribution is hidden on page load. Thanks!

However, GitHub failed to deploy the PR to Vercel's preview environment. I suspect it's due to a minor TypeScript error. TS says click doesn't exist on Element:

Screen Shot 2024-12-27 at 4 12 00 PM

The fix should be pretty easy. If we just annotate attributionButton's type as an HTMLElement, then the error goes away:

Screen Shot 2024-12-27 at 4 23 35 PM

Copy link
Collaborator

@CodeWritingCow CodeWritingCow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DonovanAndrews300 can you add a type annotation for attributionButton? I'll then approve and merge your PR. Thanks!

Copy link
Collaborator

@CodeWritingCow CodeWritingCow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DonovanAndrews300 PR looks good. Thanks!

@CodeWritingCow CodeWritingCow merged commit 8dd910d into CodeForPhilly:staging Dec 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants