Repository navigation
docs: read passport dates from the core catalog - #40
Merged
Merged
Conversation
Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
4 tasks done
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
Every passport date on both sites is now read from dpp-core's instrument catalog instead of being typed into a page. The docs' regulatory pages carried 14 of them by hand, and the landing carried 8 more outside
/regulations, which already read the catalog. The org style guide (DOCS-STYLE.md) says regulatory dates live in code.Changes
chore(docs): vendor the acts from dpp-core:core-source.jsongains a second destination for the instrument records,site/dpp-docs/src/data/instruments. The pin, the sync script andcheck:coreare unchanged and cover both copies. The copy sits inside the docs folder so a pin bump changes files the docs Pages project watches. Reading the landing's copy would have left the docs stale after a bump.check:coreis proven to fail when the docs copy drifts.docs: render passport dates from the catalog: a<PassportDate act="<id>" />component (src/lib/acts.ts) replaces the 14 dates on the battery, ESPR, toys, detergents and acts-and-standards pages. Ashortform keeps "23 Sep 2029" in tables, spelled out because current ICU data abbreviates September as "Sept".fix(landing): read passport dates from the catalog:passportDateOf()insrc/lib/regulations.tsfor pages (lifecycle, roadmap, repairers and recyclers, timeline, example passport), and{passport:<id>}tokens infaq.jsonandglossary.json, filled where each page loads its copy, so the visible text and the JSON-LD agree. The README states the rule.Both builds fail for an act with no sourced date: tried with
act="espr"on the docs and{passport:cpr-2024-3110}on the landing, and each build stopped with the helper's own error.Left as written, each beside the article that sets it: the detergents transition dates (Art. 36), Commission deadlines, application dates and registry user-guide versions. The ELV Art. 13(1) date is inside a quotation of the Official Journal and stays as the act prints it.
_main.astrois an unbuilt draft and still has one date. The matching style-guide wording is in odal-node/.github#1.Checklist
pnpm -r buildandpnpm -r checkcheck:links,check:llms,check:sitemaps,check:leakage,check:spacing,test:scripts,test:verify,check:core{passporttoken or component name reaches a page.envfiles in the diff