forked from osmlab/latest-changes
-
Notifications
You must be signed in to change notification settings - Fork 2
Tag comparison table & download button & vandalism checker & details #14
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
Open
rene78
wants to merge
171
commits into
tyrasd:gh-pages
Choose a base branch
from
rene78:gh-pages
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 8e37488.
.changeset-table width 100% Code cleanup
3rd API call to get extended user data (total number of edits & sign-up date) implemented.
A race condition could occur if the user interacted with the changeset list immediately after clicking "Get Changesets" for a new location.
The Problem:
1. The `run()` function would clear the `changesets` object in memory.
2. However, the old UI list remained visible for a moment until the first API call returned.
3. If a `mouseover` event fired on a stale list item during this window, the `click()` handler would be called with old data.
4. This would pollute the new (and mostly empty) `changesets` object with a `highlightedChangeset` ID from the previous dataset.
5. The next interaction with the new, fully-loaded list would then cause a `TypeError` when trying to access this non-existent changeset ID.
The Solution:
This commit moves the clearing of the results list (`d3.select('#results').html("")`) to the very beginning of the `run()` function.
By immediately removing the stale UI, we close the window for any user-triggered events on old data, thus preventing the race condition.
'Latest Changes' --> 'OSM Latest Changes'
Closes #3 The application would occasionally crash with an "Invalid LatLng object: (NaN, NaN)" error when rendering changesets. This was caused by a rare edge case in the Overpass `adiff` output that I do not fully understand which resulted in `osmtogeojson` generating GeoJSON features with `null` values in their coordinate arrays. This commit resolves the issue by adding a filter that sanitizes the `allGeojsonFeatures` array before it is passed to Leaflet. Any feature containing `null` values within its coordinate structure is now safely discarded, preventing Leaflet from attempting to render invalid geometry and crashing the application.
- Currently '//overpass-api.de/api/' runs into a lot of 504 errors. Thus changed to '//overpass.private.coffee/api/' in the hope that this instance works better.
- Ensures long text, such as URLs, in table cells wraps correctly to prevent horizontal overflow. - Expands the changeset highlighting to cover the entire '.result' list element for better visibility.
Added a 4th API call sequence to load comments for changesets with activity. Since the OSM API requires fetching discussions individually: 1. Implemented a sequential async loop to avoid 429 Rate Limit errors. 2. Added AbortSignal integration to cancel pending fetches if the map is refreshed.
stop using the outdated /browse path
- Update `createTable` to link keys and values to the OSM Wiki (optimistic linking). - Add logic to prevent Wiki linking for numeric values and free-text fields (e.g., names, refs). - Add `linkify` and `escapeHtml` helper functions to convert text URLs into clickable `<a>` tags. - Update `website`, `contact:website`, and similar keys to auto-prepend `http://` if the protocol is missing. - Enable clickable URLs in changeset comments, discussion comments, and free-text tags (e.g., `note`, `description`).
- Skip Wiki linking for 'mobile' - Add html 'title' tag for wiki links
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @tyrasd,
some more minor changes: