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/kak/drag tour destinations#1112 #1157

Conversation

flibbertigibbet
Copy link
Contributor

Overview

Allow dragging tour destinations in sidebar to reorder them, which triggers refreshing the route to update the waypoint order and destination.

Notes

I based this PR on #1126. I'll rebase on tours once #1126 has merged.

Testing Instructions

  • Go to the map page for a tour
  • Destinations in sidebar should have expected drag-and-drop interactions
  • On destination reorder directions should update as expected
  • Event destinations should not be draggable (only tours)

Closes #1112

@flibbertigibbet
Copy link
Contributor Author

build again

@flibbertigibbet flibbertigibbet force-pushed the feature/kak/drag-tour-destinations#1112 branch 2 times, most recently from cead4ab to e976ff4 Compare October 11, 2019 15:59
@flibbertigibbet
Copy link
Contributor Author

This has been rebased on #1156 and should be testable again now.

Pass full tour object to template.
Add library for reordering HTML lists.
Also pick up minor package updates.
Fix loading jQuery Sortable plugin.
When user drags to reorder tour destination list, update directions.
Closes azavea#1112.
Fix loading spinner not showing after redesign/moving tour sidebar element in DOM.
Copy link
Contributor

@KlaasH KlaasH 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!

Comment on lines +57 to +63
if (tour.id !== tourId) {
tourId = tour.id;
destinations = tour.destinations;
} else {
// tour unchanged; preserve user assigned destination order
tour.destinations = destinations;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nice detail, preserving their changes as much as we can.

@flibbertigibbet flibbertigibbet force-pushed the feature/kak/drag-tour-destinations#1112 branch from aa41e68 to f0bf510 Compare October 15, 2019 14:11
@flibbertigibbet flibbertigibbet merged commit abd9e4f into azavea:tours Oct 15, 2019
@flibbertigibbet flibbertigibbet deleted the feature/kak/drag-tour-destinations#1112 branch October 15, 2019 14:43
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