Skip to content

Conversation

@DonovanAndrews300
Copy link
Contributor

@DonovanAndrews300 DonovanAndrews300 commented Dec 14, 2024

Description

This PR introduces a button in the top-left corner of the Find Properties map. The button allows users to toggle between the three currently enabled map styles. Addresses (Issue#890)


Steps to Test

  1. Navigate to the Find Properties tab.
  2. Verify that the map switcher component appears in the top-left corner of the map.
  3. Try to apply each map style
  4. Ensure styles are correctly being applied to the map component
  5. Ensure the property list loads as expected.
  6. Confirm the map functionality remains consistent with previous behavior.

Screenshots

Screencast.from.12-17-2024.02.38.09.PM.webm

@vercel
Copy link

vercel bot commented Dec 14, 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 Jan 20, 2025 10:31pm

return featuresInView.slice(start, end);
}, [page, featuresInView, smallScreenMode]);

return hasLoadingError ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error UI was removed because changing the map style temporarily causes an error due to no items being in the property list. I noticed there is a separate UI designed specifically for "no results," rather than displaying the error UI. I wanted to bring this to attention.

Copy link
Contributor

Choose a reason for hiding this comment

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

@DonovanAndrews300 before removing the error UI, can you look at PR #732? The error UI appears if the map fails to fetch data. Removing that UI might have unexpected consequences and re-introduce a bug that was fixed by that previous PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this you were absolutely correct in removing the error UI causing breaking changes for the reasons mentioned in the PR you linked. I added the UI back in and instead just had it skip setting the error state in the map component depending on the error received.

@CodeWritingCow CodeWritingCow changed the base branch from main to staging December 15, 2024 20:36
Copy link
Contributor

@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 can you use the switch control mentioned in the ticket requirements? Thanks!

@nlebovits
Copy link
Collaborator

@DonovanAndrews300 just wanted to chime in and say thanks for working on this! Progress looks good--excited to see it deployed.

@nlebovits
Copy link
Collaborator

@CodeWritingCow is this ready to go? Can you merge it if it is?

@CodeWritingCow
Copy link
Contributor

@nlebovits @DonovanAndrews300 GitHub didn't deploy to Vercel preview environment. I'm running the PR code locally to see if there's anything that might be causing this.

Comment on lines 518 to 478
if (
e.error.cause ===
"The layer 'vacant_properties_tiles_polygons' does not exist in the map's style and cannot be queried for features."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we handle errors just by calling setHasLoadingError(true);?

The if statement seems unnecessary, especially because it's comparing e.error.cause to a hardcoded error message.

DonovanAndrews300 and others added 5 commits January 10, 2025 15:54
Replace Mapbox geocoding control with Maptiler Geocoding control.
Comment out line of code that was causing NextJS Web application to crash.
@CodeWritingCow
Copy link
Contributor

@DonovanAndrews300 when the map first loads, it doesn't show any streets:

Screen Shot 2025-01-14 at 9 13 16 PM

Can we make it load with streets showing, like what we have in production?

Screen Shot 2025-01-14 at 9 13 30 PM

@CodeWritingCow CodeWritingCow removed the request for review from zigouras January 25, 2025 02:59
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2025

This PR has been marked as stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label Feb 2, 2025
@CodeWritingCow CodeWritingCow merged commit 035a758 into CodeForPhilly:staging Feb 7, 2025
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