-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
Text("Add Map Location") | ||
}) | ||
.padding(.all) | ||
.background(Color.gray) |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
OTPKit/Features/OriginDestination/Sheets/OriginDestinationSheetView.swift
Show resolved
Hide resolved
import MapKit | ||
import SwiftUI | ||
|
||
public final class LocationManagerService: NSObject, ObservableObject { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks @aaronbrethorst!
There was a problem hiding this 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).
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:
- Buttons wrapped in HStack and given equal width
- Helper text above the buttons to explain how to use the feature
- Button styles driven entirely by the
.buttonStyle()
modifier instead of custom styling.
Text("Add Map Location") | ||
}) | ||
.padding(.all) | ||
.background(Color.gray) |
There was a problem hiding this comment.
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.
…the choose on map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! 🚀
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