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

Feature: Make Waypoints in RoutingView draggable #349

Merged
merged 45 commits into from
Dec 8, 2023

Conversation

kruegercharles
Copy link
Contributor

@kruegercharles kruegercharles commented Nov 3, 2023

See: https://trello.com/c/2hRM1W4v

  • Figure out how is the waypoint currently placed on map
  • Implement test if user clicked on an existing waypoint ⟹ use distance on screen not distance via GPS
  • Use correct icons for dragging waypoint or destination
  • Use animated container during drag (used animatedpositioned)
  • Fix: the destination of the route must always stay the same, except when the user drags the destination
  • Feedback Daniel: use onMapTap to check if user tapped on waypoint (we get features with screencoordiantes....maybe we need to name the waypoints) (discarded because my implementation works fine - no need to change)
  • Make waypoints draggable
  • If dragging waypoint the map should not move and vice versa
  • Old waypoint must be removed from history & new waypoint must be added to history after dragging
  • Waypoint has to be updated in BottomSheet after dragging
  • Route must be updated after dragging
  • Add short animation: Start dragging makes icon bigger and stop dragging makes icon smaller (discarded because it didn't work well)
  • When dragging to the edge of the screen, move the screen
  • Fix: Why does it shortly show the waypoint icon when releasing the destination icon??
  • Try: use tapping detector instead of longPress detector to "fake" a longPress detector with shorter delay (discarded because it didn't change anything. I still had to press for approx. 1 second on waypoint to select it)
  • Fix: When dragging waypoint to screen edge it movement eventually stopps - is this fixable or a problem of onLongPressMoveUpdate? (with onLongPress I don't have details provided to get the tapped position of user)
  • Refactore Code from Daniel
  • Fix: When a waypoint is dragged outside of the city boundries, it is deleted ⟹ it should be restored at old position
  • Fix: The new position after dragging is often very inaccurate
  • Test on different device sizes: check map move speed and ability to drag waypoint
  • Test on IOS
  • Rewrite Android-Code by also moving with coords instead of moveTo? (thats not a good idea because using gps means mapmovement gets faster when zoomed in)
  • Add delay (maybe 10ms) to camera-movement to slow down and use slower speed?
  • Circles around waypoint when dragging
  • button to cancel dragging

@kruegercharles kruegercharles marked this pull request as ready for review December 1, 2023 12:00
@PaulPickhardt
Copy link
Member

As discussed f2f:
Maybe we can try to add auxiliary markers around the dragged waypoint to help the user to place the marker and to even recognize that the marker is draggable.

Also we should implement a cancel bin to enable aborting drags.

I started the auxiliary marking animation. Please have a look @kruegercharles. Maybe there is a way to let a container grow from the center. Otherwise we need to define an animation that also effects the Positioned widget.

@kruegercharles
Copy link
Contributor Author

As discussed f2f: Maybe we can try to add auxiliary markers around the dragged waypoint to help the user to place the marker and to even recognize that the marker is draggable.

Also we should implement a cancel bin to enable aborting drags.

I started the auxiliary marking animation. Please have a look @kruegercharles. Maybe there is a way to let a container grow from the center. Otherwise we need to define an animation that also effects the Positioned widget.

I've fixed the position of the cancel button. It now works on the small Nexus, the bigger Motorola as well as my phone. Please test if it works on iOS too.
Other than that I think this PR is done 🙂

Copy link
Member

@PaulPickhardt PaulPickhardt left a comment

Choose a reason for hiding this comment

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

Great work @kruegercharles!

Feature looks really cool.

Just did some minor refactoring.

@kruegercharles kruegercharles merged commit e469f0f into dev Dec 8, 2023
1 check passed
@kruegercharles kruegercharles deleted the feature/dragwaypoint branch December 8, 2023 09:34
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