Repository navigation
feat(specifications): add change history, adopters chart and shared mobility modes - #68
Merged
Merged
Conversation
…obility modes History section on every specification page: - Read from GitHub's public API in the visitor's browser, so an open pull request appears as soon as it is opened, without a site rebuild. - "Proposed changes": open pull requests touching the entry's file, with "Review in progress", who proposed it, the start of the description and a Field / Before / Proposed table (vocabulary labels, at most 6 rows). - "Recent changes": the last 4 changes merged into main, with who proposed and who merged them; the field table is folded under "What changed". Commits made without a pull request show as "Committed". - Responses are cached for 10 minutes in sessionStorage and shared between pages to stay within the 60 unauthenticated calls per hour. When GitHub cannot be reached, the section falls back to a link to the file history. - Before/after values are compared by parsing both revisions of the file with js-yaml 4.1.0 (MIT), vendored under overrides/assets/javascript/vendor and loaded only on specification pages. Known adopters chart in the Adoption section: - Built at build time from the git history of each data file (scripts/spec_history.py). One point per count date; edits that leave the count unchanged are ignored. - Shown only when there are at least 2 points. Time on the x axis, adopters from 0 on the y axis, no legend, latest value labelled, exact values on hover/focus and in a screen-reader table. - Without git history (shallow clone) the chart is simply left out. Modes: add bikeshare, shared_scooter and carsharing to the vocabulary and data/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
etienne0101
added a commit
that referenced
this pull request
Nov 4, 2026
Empty commit. The previous check tested this branch merged into main from before #68, which added the bikeshare, shared_scooter and carsharing modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
etienne0101
added a commit
that referenced
this pull request
Nov 5, 2026
…ing visitors The server lets browsers keep CSS and JS files for 4 hours (cache-control: max-age=14400), and the site's own files keep the same name from one deploy to the next. After a deploy a returning visitor gets the new HTML with the old script or stylesheet. This is why the History section of the specification pages stayed on its fallback text after #68 was deployed: the cached specifications.js predated it. A new hook, hooks/asset_versions.py, links every local entry of extra_css and extra_javascript as <path>?v=<first 10 hex digits of the file's SHA-256>. The suffix only changes when the file does, so browsers keep their copy between deploys and fetch the new one as soon as it changes. External URLs are left alone, and Material's own bundle already has a hash in its name. Nothing changes for visitors: the same file is served with or without the suffix. Checked with ProperDocs 1.6.7: every page links e.g. assets/javascript/specifications.js?v=4f9819e1de, and the GBFS page still loads its History section and js-yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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.
Summary
Adds a History section to every specification page, a known adopters chart to the Adoption section, and three shared mobility modes.
History section
Shows what changed on the entry's data file, read live from GitHub in the visitor's browser. An open pull request therefore appears as soon as it is opened, without waiting for a site rebuild.
data/specifications/<id>.md, with a "Review in progress" badge, the date, "Change proposed by @login" (linked to the profile), the start of the description, and a compact Field / Before / Proposed table. Values use the same labels as the page ("Bikeshare", "Compliant", "1,536"), and the table shows at most 6 rows with a link to GitHub for the rest.main, with "Change proposed by" and "Change merged by". The field table is folded under "What changed" to keep the list short. A commit pushed without a pull request shows as "Committed" with "Changed by".raw.githubusercontent.com, which has no rate limit) and comparing them field by field. Parsing uses js-yaml 4.1.0 (MIT), vendored inoverrides/assets/javascript/vendor/(integrity checked against the npm registry) and loaded only on specification pages.Limits
sessionStorageand shared between pages. Per-commit lookups stop as soon as 4 changes are found.api.github.comandraw.githubusercontent.comon specification pages.Known adopters chart
scripts/spec_history.py, onegit logplus onegit cat-file --batchfor all files).adopters_count_updated, or the commit date when it is missing). Edits that leave the count unchanged are not new points.mdip_org_website_updater.shwas not checked.Modes
Adds
bikeshare(Bikeshare),shared_scooter(Shared scooter) andcarsharing(Carsharing) to the vocabulary inscripts/spec_data.pyand todata/README.md. #67 already uses these modes, so its data check will pass once this is merged.Testing
make specs-check: no errors.mkdocs serve: History checked on GBFS (two open PRs) and Beckn (merged PRs), in light and dark mode, at desktop and phone widths. The chart was checked with a temporary edit, then reverted.🤖 Generated with Claude Code