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

Make Origin Destination Working Marker View #32

Merged
merged 4 commits into from
Jul 20, 2024

Conversation

hilmyveradin
Copy link
Collaborator

Make Origin Destination Working Marker View

Related Issues

#22

Description

This PR scope is adding marker on origin and destination map

Media

abcdef.mov

Test Instructions

  1. Try to select select map based on origin or destination. See if the marker shown and stayed there

Text("Add Map Location")
})
.padding(.all)
.background(Color.gray)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @aaronbrethorst, I wonder do you have any suggestion on this color? Seems like the contrast is not good for our texts...

Copy link
Member

Choose a reason for hiding this comment

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

I recommend a white background and a gray border for the button.

import MapKit
import SwiftUI

public final class LocationManagerService: NSObject, ObservableObject {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I move all the location-services based to one LocationManagerService. What do you think of this approach? I'm kinda confused about this since I'm afraid it will be bloated one day, but if I separate this into many classes I'm afraid it will make an unnecessary abstraction? What do you think? @aaronbrethorst

Copy link
Member

Choose a reason for hiding this comment

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

Let's not worry about over-bloating eventually. For now, I think this is a totally reasonable approach. https://understandlegacycode.com/blog/refactoring-rule-of-three/#premature-refactoring-is-the-root-of-many-bad-things

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it. Thanks @aaronbrethorst!

OTPKitDemo/MapView.swift Show resolved Hide resolved
Copy link
Member

@aaronbrethorst aaronbrethorst 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 looks like great progress! I have a couple thoughts about the UI:

Change Stop

Move "Select based on map" to this page. Also, please rename that option to "Choose on Map" (which is the same thing Google Maps calls that option).

image

MapMarkingView

After some considerations, I've made some changes to this UI. Check out the changes I made and tell me what you think. Here are a few things to note in particular about my changes:

  1. Buttons wrapped in HStack and given equal width
  2. Helper text above the buttons to explain how to use the feature
  3. Button styles driven entirely by the .buttonStyle() modifier instead of custom styling.

Text("Add Map Location")
})
.padding(.all)
.background(Color.gray)
Copy link
Member

Choose a reason for hiding this comment

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

I recommend a white background and a gray border for the button.

@hilmyveradin
Copy link
Collaborator Author

I think this looks like great progress! I have a couple thoughts about the UI:

Change Stop

Move "Select based on map" to this page. Also, please rename that option to "Choose on Map" (which is the same thing Google Maps calls that option).

image

MapMarkingView

After some considerations, I've made some changes to this UI. Check out the changes I made and tell me what you think. Here are a few things to note in particular about my changes:

  1. Buttons wrapped in HStack and given equal width
  2. Helper text above the buttons to explain how to use the feature
  3. Button styles driven entirely by the .buttonStyle() modifier instead of custom styling.

About moving the "choose on map option", I assume that you expect something like this? (I'm not really sure)
IMG_5548

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

nice! 🚀

@aaronbrethorst aaronbrethorst merged commit 76c3721 into main Jul 20, 2024
4 checks passed
@aaronbrethorst aaronbrethorst deleted the Issue-22-origin-destinaton_based_on_map branch July 20, 2024 04:20
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