Skip to content

🧹 Simplify annotation drag lifecycle function - #22

Merged
esenmx merged 2 commits into
masterfrom
refactor/simplify-annotation-drag-lifecycle-1535924952615495644
Aug 23, 2026
Merged

esenmx merged 2 commits into
masterfrom
refactor/simplify-annotation-drag-lifecycle-1535924952615495644

Conversation

@esenmx

@esenmx esenmx commented Aug 22, 2026

Copy link
Copy Markdown
Owner

🎯 What

Refactored mapView(_:annotationView:didChange:fromOldState:) by moving it to AnnotationController.swift alongside other annotation delegate methods and breaking down the drag lifecycle logic into smaller helper functions (handleAnnotationDragChange, handleAnnotationDragEnd).

💡 Why

  • Improves code maintainability and readability by consolidating annotation delegate methods in AnnotationController.swift.
  • Simplifies the drag lifecycle function into small, single-responsibility helper methods.

✅ Verification

  • Ran flutter test (all 144 unit tests passed).
  • Ran flutter analyze and dart format (0 issues found).
  • Requested and passed code review (#Correct#).

✨ Result

Cleaner, modular, and more maintainable Swift codebase for annotation drag lifecycle handling without changing any external behavior.


PR created automatically by Jules for task 1535924952615495644 started by @esenmx

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits August 23, 2026 19:06
Co-locate annotation drag delegate callback in AnnotationController.swift with other annotation delegate methods and break down drag handling into dedicated helper functions.

Co-authored-by: esenmx <43244505+esenmx@users.noreply.github.com>
…oller

Drop the handleAnnotationDragChange/handleAnnotationDragEnd helper
split so the relocation reads as a pure move (+21/-21, added block
byte-identical to the removed one). Keeps `annotation.wasDragged =
true` ordered before onAnnotationDragEnd, which annotationsToChange
relies on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@esenmx
esenmx force-pushed the refactor/simplify-annotation-drag-lifecycle-1535924952615495644 branch from b6e4e62 to 75f6dd4 Compare August 23, 2026 16:08
@esenmx
esenmx merged commit e078d73 into master Aug 23, 2026
7 checks passed
@esenmx
esenmx deleted the refactor/simplify-annotation-drag-lifecycle-1535924952615495644 branch August 23, 2026 16:11
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.

1 participant