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

nearby view: react to user location #1159

Merged
merged 8 commits into from
May 12, 2024

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Description:

The nearby view was ignoring the user location. This is not a good thing! This PR makes use of the user current position, regardless of how we get that position.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

I think this is causing a bug where when you navigate to Nearby View from elsewhere, the useEffect triggers and immediately redirects to the current location if it's present. I think a better way to handle this would be to use the new function that I added that calculates which location to use for the nearby view. Then we can use the user's current location if we don't have one from the URL.

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

Works much better, thank you! The only other thing that would be a nice to have is zooming the map to the user's location when you navigate to the nearby view without a set location. (as is, the map doesn't move, so the nearby view center could be off screen)

@miles-grant-ibigroup
Copy link
Collaborator Author

Works much better, thank you! The only other thing that would be a nice to have is zooming the map to the user's location when you navigate to the nearby view without a set location. (as is, the map doesn't move, so the nearby view center could be off screen)

I think this behavior is covered by another PR!

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good!

@miles-grant-ibigroup miles-grant-ibigroup merged commit ce4749d into dev May 12, 2024
9 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the nearby-view-react-to-user-location branch May 12, 2024 14:38
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.

3 participants