Skip to content

fix(reverseGeocoder): abort ongoing requests if a new reverse geocode request comes in#571

Open
dopenguin wants to merge 2 commits intonextfrom
vue3/abort-reverse-geocode-on-new-request
Open

fix(reverseGeocoder): abort ongoing requests if a new reverse geocode request comes in#571
dopenguin wants to merge 2 commits intonextfrom
vue3/abort-reverse-geocode-on-new-request

Conversation

@dopenguin
Copy link
Copy Markdown
Member

Summary

As the title states, reverse geocoding is now being aborted once a new request comes in. If this were not to be added, I could e.g. drag the pin around a few times and the map would keep centering on ALL position.

Instructions for local reproduction and review

Drag the pin around a few times in iceberg. It should now only center the map on the last position.

@dopenguin dopenguin added this to the POLAR@3 milestone Mar 2, 2026
@dopenguin dopenguin self-assigned this Mar 2, 2026
@dopenguin dopenguin added the bug Something isn't working label Mar 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

PR Preview Action v1.8.0

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-571/

Built to branch gh-pages at 2026-04-22 14:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Collaborator

@oeninghe-dataport oeninghe-dataport left a comment

Choose a reason for hiding this comment

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

🏓 @dopenguin

Comment thread src/plugins/reverseGeocoder/utils/reverseGeocode.ts
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch from 0c02dad to 21d3d96 Compare March 5, 2026 15:28
@dopenguin
Copy link
Copy Markdown
Member Author

🏓 @dopenguin

🏓 @oeninghe-dataport

@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch 4 times, most recently from 96d23eb to a515693 Compare March 12, 2026 11:36
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch from a515693 to 19bbfc6 Compare March 17, 2026 16:12
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch from 19bbfc6 to 1fd20eb Compare March 30, 2026 10:53
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch from 1fd20eb to 0305b6d Compare April 7, 2026 09:28
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch 3 times, most recently from a6674df to d375ad5 Compare April 17, 2026 12:32
@dopenguin dopenguin force-pushed the vue3/abort-reverse-geocode-on-new-request branch from d375ad5 to 3d99281 Compare April 20, 2026 11:16
Copy link
Copy Markdown
Member

@warm-coolguy warm-coolguy left a comment

Choose a reason for hiding this comment

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

🏓 @dopenguin @oeninghe-dataport I closed the prior thread; if that pattern is to be changed, it should happen globally as a separate effort as proposed, and should prior to change be discussed in our Weekly.

Skimming the code, I found various instances of signal.aborted checks that were, in other spots, used to prevent spamming the console. I propose this technique is used here, too, to avoid confusion regarding "unerroring errors" further down the line.

@dopenguin
Copy link
Copy Markdown
Member Author

🏓 @dopenguin @oeninghe-dataport I closed the prior thread; if that pattern is to be changed, it should happen globally as a separate effort as proposed, and should prior to change be discussed in our Weekly.

Skimming the code, I found various instances of signal.aborted checks that were, in other spots, used to prevent spamming the console. I propose this technique is used here, too, to avoid confusion regarding "unerroring errors" further down the line.

So you propose moving the AbortController from the util to the store and passing the signal to the utility function?

🏓 @warm-coolguy @oeninghe-dataport

@warm-coolguy
Copy link
Copy Markdown
Member

🏓 @dopenguin @oeninghe-dataport I closed the prior thread; if that pattern is to be changed, it should happen globally as a separate effort as proposed, and should prior to change be discussed in our Weekly.
Skimming the code, I found various instances of signal.aborted checks that were, in other spots, used to prevent spamming the console. I propose this technique is used here, too, to avoid confusion regarding "unerroring errors" further down the line.

So you propose moving the AbortController from the util to the store and passing the signal to the utility function?

🏓 @warm-coolguy @oeninghe-dataport

Yes, please.

🏓 @dopenguin

@dopenguin
Copy link
Copy Markdown
Member Author

🏓 @dopenguin @oeninghe-dataport I closed the prior thread; if that pattern is to be changed, it should happen globally as a separate effort as proposed, and should prior to change be discussed in our Weekly.
Skimming the code, I found various instances of signal.aborted checks that were, in other spots, used to prevent spamming the console. I propose this technique is used here, too, to avoid confusion regarding "unerroring errors" further down the line.

So you propose moving the AbortController from the util to the store and passing the signal to the utility function?
🏓 @warm-coolguy @oeninghe-dataport

Yes, please.

🏓 @dopenguin

Been there, done that b032ba5

🏓 @warm-coolguy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants