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

added globe and location buttons to map #3913

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

motuz0001
Copy link

@motuz0001 motuz0001 commented Oct 22, 2024

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix (fixes an issue)
  • Feature (adds functionality)
  • Code style update
  • Refactoring (no functional changes)
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

What is the current behavior?

The map currently does not have a buttons for unzooming to global view and zooming to user's location.

What is the new behavior?

  • Added a globe button that allows users to unzoom to a world view of the map.
  • Added a location button that zooms into the user's current geographic location.

image

Does this PR introduce a breaking change?

  • Yes
  • No

Git Issues

Closes #3879

What happens next?

Thanks for the contribution! We try to make sure all PRs are reviewed ahead of our monthly maintainers call (first Monday of the month)

If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.

If you need more immediate feedback you can try reaching out on Discord in the Community Platform development channel.

@motuz0001 motuz0001 requested a review from a team as a code owner October 22, 2024 21:52
Copy link

cypress bot commented Oct 22, 2024

onearmy-community-platform    Run #6514

Run Properties:  status check passed Passed #6514  •  git commit f5dfe72990: Update map.spec.ts
Project onearmy-community-platform
Branch Review pull/3913
Run status status check passed Passed #6514
Run duration 05m 07s
Commit git commit f5dfe72990: Update map.spec.ts
Committer Matúš Motyka
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 76
View all changes introduced in this branch ↗︎

@motuz0001
Copy link
Author

hey @joperafe , I'm not sure if you'll be the one reviewing this or if someone else will, but I think it's finally done. I fought with the tests for a while but eventually found a way to check the zoom. Let me know if any changes are needed or if something is wrong. Thanks!

@motuz0001
Copy link
Author

or maybe @benfurber should review this, not sure hah

@joperafe
Copy link

joperafe commented Nov 5, 2024

hey @joperafe , I'm not sure if you'll be the one reviewing this or if someone else will, but I think it's finally done. I fought with the tests for a while but eventually found a way to check the zoom. Let me know if any changes are needed or if something is wrong. Thanks!

Hi there! No no, not me. First timer
Just went through the PR back then and decided to say something :D

Thank you

@benfurber benfurber added the Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview label Nov 5, 2024
Copy link
Member

@benfurber benfurber left a comment

Choose a reason for hiding this comment

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

Thank you so much for your contribution @motuz0001!

One. Can you move the buttons to the top right please. You'll see why below!
Screenshot 2024-11-05 at 16 08 23

Two. There's a lot of custom styles. I'm hoping that when you don't have to position absolute, most of them go away. I'd rather less custom styling that leave the buttons imperfect.

Three. The tooltips don't work for me on Firefox, do they for you?

Thank you for struggling with the feature test, I appreciate it.

},
}}
onClick={() => {
setZoom(1)
Copy link
Member

Choose a reason for hiding this comment

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

There's an existing INITIAL_ZOOM const on 1Maps.client` that can be used rather than 1.


{/* Location button to Zoom in to your location */}
<Button
data-tip="Zoom in to your location"
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather have...

const ZOOM_IN_TOOLTIP = "Zoom in to your location"

export const MapWithList = (props: IProps) => {
...
          <Button
            data-tip={ZOOM_IN_TOOLTIP}

Make sense?


{/* Globe button to Zoom out to world view */}
<Button
data-tip="Zoom out to world view"
Copy link
Member

Choose a reason for hiding this comment

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

Same point as above.

@benfurber
Copy link
Member

Oh and a complex rebase is needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Maps 🗺 Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview
Projects
Status: No status
Status: 💬 Changes Requested/with author
Development

Successfully merging this pull request may close these issues.

feat: add user interactions to new map
3 participants