Skip to content

RTFDB-4842: Improve user input handling in "mapbox-gl-geocoder" - #555

Open
pahuta wants to merge 2 commits into
mainfrom
RTFDB-4842-improve-user-input-handling-in-mapbox-gl-geocoder
Open

RTFDB-4842: Improve user input handling in "mapbox-gl-geocoder"#555
pahuta wants to merge 2 commits into
mainfrom
RTFDB-4842-improve-user-input-handling-in-mapbox-gl-geocoder

Conversation

@pahuta

@pahuta pahuta commented Aug 2, 2026

Copy link
Copy Markdown
  • Trim user input once, at the top of _geocode(), so it applies consistently to both forward and reverse geocoding
  • Remove now-redundant .trim() call in the forward-geocoding branch of _setupConfig()
  • Simplify REVERSE_GEOCODE_COORD_RGX by dropping the leading/trailing whitespace handling, since input reaching it is now always pre-trimmed
  • Add tests covering reverse-geocode coordinate strings with leading/trailing whitespace and whitespace around the comma, and forward-geocode queries with surrounding whitespace

https://mapbox.atlassian.net/browse/RTFDB-4842

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • run npm run docs and commit changes to API.md
  • update CHANGELOG.md with changes under main heading before merging

pahuta added 2 commits August 2, 2026 01:55
- Trim user input once, at the top of `_geocode()`, so it applies consistently to both forward and reverse geocoding
- Remove now-redundant `.trim()` call in the forward-geocoding branch of `_setupConfig()`
- Simplify `REVERSE_GEOCODE_COORD_RGX` by dropping the leading/trailing whitespace handling, since input reaching it is now always pre-trimmed
- Add tests covering reverse-geocode coordinate strings with leading/trailing whitespace and whitespace around the comma, and forward-geocode queries with surrounding whitespace

https://mapbox.atlassian.net/browse/RTFDB-4842
@pahuta
pahuta marked this pull request as ready for review August 5, 2026 09:42
@pahuta
pahuta requested a review from a team as a code owner August 5, 2026 09:42
@pahuta
pahuta requested review from underoot and removed request for a team August 5, 2026 09:42
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