* retry all unsuccessful map calls after waiting 8 seconds (spinner continues to indicate loading state)
* also logged-in users can be rate limited: add dedicated error message
* don't log users out when requests return 401/403 (except on the _get own user data_ request, which would indicate that the oauth token was revoked): it's better to show the error message if a legitimate api call was actually unauthorized
closes#10299
when user logs out of osm.org via the logout button: the popup continues to the login screen, which if completed now logs the user back into iD with the new credentials
as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
OAuth2's idea of "logout" is just to get rid of the bearer token.
If we try to "login" again, it will just grab the token again.
What a user probably _really_ expects is to logout of OSM so that they can switch users.
- Notes still load over the xml api, so when the user is not authenticated,
we can't use d3_json to fetch them (instead use to d3_xml)
- Make sure to delete the deferred callback handles once the callbacks are
processed (probably unnecessary, but good housekeeping)
- Remove a stray `if (!json.elements)` block from the `parseUserJSON`
function. This was preventing the user profile from parsing, as the
user's JSON has no such property (was probably copied from `parseJSON`)
`utilIdleWorker` was only used one place.
It just processes a list in an idle callback.
I'm working towards removing the util functions for handling idle work.
We can still do `requestIdleCallback` work throughout the code, however
each place we use it needs to have a strategy for cancellation, which
the existing util functions don't allow for.
Because the done callback is expecting something that has a `status` property,
(like an XHR would), we need to extract the status out of the error message.
d3-xml includes status in the error message, but we can't access the response itself.
(closes#4890)
This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
(re #6087)
- some were able to do a different approach
(validations/almost_junction, and settings/*)
- some were replaced with custom speedy cloners
(in orthogonalize clonePoints and osm.js cloneNoteCache)
- some just replaced with JSON.parse(JSON.stringify()))