refactor: deepen news sources, brand identity, and styles - #158
Open
ronaldtse wants to merge 2 commits into
Open
refactor: deepen news sources, brand identity, and styles#158ronaldtse wants to merge 2 commits into
ronaldtse wants to merge 2 commits into
Conversation
- Article interface (lib/article.ts) as the single news seam; wire, spoke, and post adapters (lib/sources/) project onto it, and newsIndex composes them — pages and feeds no longer import raw readers - lib/identity.ts consolidates suite/platform/product/client marks; BrandMark.astro is the one renderer for all of them - lib/cachedFetch.ts is the single cache-first fetcher (spoke + wire) - global.css split into tokens/components/pages with global.css as composition root; deduped .news-filter-chip - removed the superseded modules: newsmlSpoke, logoTreatment, productIdentity, LogoFigure, SuiteLogo, PlatformLogo, NewsCard, news/[...id].astro stub
This was referenced Sep 2, 2026
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.
What
Implements all five deepening candidates from the architecture review. No page changes visually; this is a structure-only refactor.
1. Article is the news seam
hub/src/lib/article.ts— the deepArticleinterface +NewsSourceseam. Every source projects onto it.hub/src/lib/sources/{wireSource,spokeSource,postSource}.ts— one adapter per source.hub/src/lib/newsIndex.ts— composes sources; exportsallArticles,newsStreamArticles,byKind,byHref,articleKind.pages/news/[...slug].astro(128 → 66 lines),pages/news/index.astro(rewritten with search + kind/year filter bar on one data source), homepage Latest, and all four feed endpoints now consumenewsIndex/newsStreaminstead of importing readers directly.2. One brand identity module
hub/src/lib/identity.ts—BrandMarktype + resolvers:suiteMark,platformMark,productMarkFor,clientMark(with verified lightInk/large treatments).hub/src/components/BrandMark.astro— the single renderer: light/dark pair, darkMono invert, ink chip for white artwork, letter-tile fallback.3. Styles split
tokens.css(fonts, palette, base) /components.css(reusable classes) /pages.css(article chrome, print, hero, filters);global.cssis the composition root. Deduped the double.news-filter-chipdefinition.4. News cards merged
NewsCard.astrohad zero consumers; both listing pages renderArticleinline. Deleted the dead component and the deadnews/[...id].astrostub (it generated zero pages).5. One cache-first fetcher
hub/src/lib/cachedFetch.ts— used byspokeSourceandHttpWireReader(its private duplicate removed).Removed (superseded, all revamp-authored)
lib/newsmlSpoke.ts,lib/logoTreatment.ts,lib/productIdentity.ts,components/{LogoFigure,SuiteLogo,PlatformLogo,NewsCard}.astro,pages/news/[...id].astro.Verified
newsml.xmlandfeed.xmlwell-formed;feed.json225 ninjs items.dist: dark pairs (expresslang), ink chip (NGI), suite/platform symbols (RNP), product chips on /news.2019-10-08-metanorma-accessibility-html-wordand2019-08-25-notes-examples-isonewsml files — hub skips them with a warning; needs a spoke-side fix.