Repository navigation
Conversation
|
@tgrospic I've continued the reader work on your mdBook-native baseline: tgrospic#1. It targets your The follow-up restores the bronze branding and approved small chapter illustrations, improves day/night readability and mobile layout, and restores scroll reading plus remembered chapter progress and manual language. Folios explicitly show chapter-local progress. It also fixes focused-control keyboard handling, rapid page turns, navigation audio, and CJK matching through the existing native search index, including direct search links and browser history. A separate commit fixes Windows paths and CRLF handling in the existing checks;
I only have Android hardware and no iPhone or iPad. This pass used browser simulation; physical iOS Safari and Android acceptance are still outstanding. Nothing has been merged or deployed. |
|
@tgrospic, following your browser-coverage request, I've rebased the follow-up PR onto The scenarios are now checked into web/test/browser.test.ts, run by The mobile scenarios exposed a touch-toolbar target moving between touchend and click, plus headings hidden behind that toolbar; both have focused fixes and regression tests. The previous Firefox CI failures came from fonts cancelled during document navigation. The monitor now distinguishes only those explicit navigation cancellations; missing-font 404 negative fixtures confirm real resource failures still fail.
The publishing step was skipped. Nothing has been merged or deployed; ready for your review. |
fix(reader): Refine reading continuity and add cross-browser acceptance
|
@tgrospic I've taken over your completed The additional commit only clarifies the README credits and preserves Tomislav Grospić in the book author configuration and handover rules. I retained your paged-only magic world and latest interface behavior. All 507 tests pass locally; the new upstream CI run is in progress. Physical Android Chrome and iOS Safari remain untested—the mobile checks use browser profiles. |
|
Closing, fulfilled its purpose. |
Overview
An mdBook-first version of the reader from #2. mdBook defines the book,
web/languages.tsdefines the editions, and everything else is derived from those two, including the tests.Editions. Every language is built by mdBook itself, selected through
MDBOOK_*environment overrides ofbook.toml. A small preprocessor (web/localize.ts) swaps inchapter.<lang>.mdtranslations, translates part titles and reports stale translations by source hash. All 11 editions share the same chapter paths. The build writes to a temporary directory and replacesbook/htmlonly when every edition succeeds.Reader. The markup is in
theme/index.hbs(mdBook's template plus the reader), the style intheme/reader.css, and one TypeScript module (web/reader.ts, bundled to/reader.js) binds it. It adds the gateway with the magic and real worlds, the paged two-column magic book with page turns across chapters and RTL, running heads and folio, text size, bookmarks, reading music, the welcome audio and the language picker. UI labels from #2 are inweb/i18n.ts. Static files are inpublic/, including the images that were insrc/assets/.Toolchain. TypeScript and Vite, no Python.
npm startserves on port 3478 and rebuilds the book on change;npm run buildbuilds every edition, then the reader bundle andpublic/.Tests.
npm testruns the review's verification plan:lang/dir, links and anchors that mdBook's own book JSON defines for each edition, with a negative test for each checkCI runs
npm ci,npm run check,npm run buildandnpm testbefore publishing.AGENTS.mdstates the repository's rules, its authority order and its Design by Meaning reading, for people and coding agents.Continuing the design (for the #2 author)
@shixi-11, the structure is in place; the visual design is yours to carry on from here. #2's look was reproduced closely but not pixel for pixel, so please compare and refine.
Where design work goes:
theme/index.hbs. The reader's elements are marked by id; if you rename one, rename it inweb/reader.tstoo.theme/reader.css. Colors are tokens on:rootwith a dark palette for the coal, navy and ayu themes. The worlds arehtml[data-world="magic"|"real"], the gateway ishtml[data-gateway], page turns arehtml[data-turn]. Prefix rules on the chapter with#content, since mdBook's#content mainoutranks class selectors.web/reader.ts. Its header lists every piece of state it keeps.public/, linked root-absolute (/forest-gateway.webp).data-i18n, ort('…')inreader.ts, then every language inweb/i18n.ts.How to work:
npm install, thennpm startand open http://localhost:3478. Template, CSS and source changes rebuild and reload./ar/), a narrow window (under 900px) and a dark theme.npm startand runnpm run check,npm run buildandnpm test.Keep design changes in the template, CSS, reader and
public/; the build and tests should not need to change. Please don't add a framework, a second list of languages or pages, or post-processing of the rendered HTML.AGENTS.mdexplains why.Additional Notes