Skip to content

Fix hydration error #418, sideways scroll on 46 pages, breadcrumb URLs, footer STEM link - #287

Merged
hubpav merged 7 commits into
mainfrom
fix/hydration-footer-breadcrumbs
Oct 28, 2026
Merged

hubpav merged 7 commits into
mainfrom
fix/hydration-footer-breadcrumbs

Conversation

@hubpav

@hubpav hubpav commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Fixes found in the website-admin infrastructure review and health check (owner approved the fix pass). Six commits, each one self-contained:

  1. React hydration error #418 on 168 pages (EN + CS). A <p> on its own line in MDX takes flow children, so it wrapped fenced code blocks (172, mostly inside <details>), paragraphs (114) and two tables. That is invalid HTML: the minifier and the browser close the <p> early, React's tree still has the block inside it, and hydration fails, so the page is re-rendered on the client. The wrapper lines are removed; the content is unchanged (the visible article text of all 992 pages is identical before and after, except the dash rewrites in commit 6).
  2. Sideways scroll on 46 pages (23 EN + 23 CS). Image boxes had a fixed width and height (500, 376, 250, 600 px), wider than a phone; they now use maxWidth and keep the image's own aspect ratio (same size from 1,440 px up; below that the image fits its column instead of spilling out of it). Homepage grids use minmax(0, 1fr) tracks and card images are capped at the card width, so the page is no longer 1,187 px wide at a 1,024 px viewport or 355 px at 320; the four desktop columns are now equal width.
  3. BreadcrumbList JSON-LD item URLs now carry the trailing slash of the served and canonical URLs (small override of DocBreadcrumbs/StructuredData). The TechArticle url no longer drops the slash on a version-number slug (bmeters-rfm-tx1.1).
  4. Footer: STEM added to the cross-site strip (HARDWARIO.com · Engineering · Studio · Academy · STEM, self-link omitted), EN and CS.
  5. robots.txt lists the Czech sitemap too.
  6. Prose: the sentence dashes on the ThingsBoard pages (EN + CS) and in llms.txt rewritten (house rule: no em dash, no spaced hyphen as a sentence dash).

Verification on local production builds (both locales):

  • Headless Chromium over all 995 sitemap pages: 0 hydration errors (before: every page with a wrapped block; e.g. /tower/firmware-sdk/how-to/how-to-gpio-pins/, /tower/hardware-modules/about-split-module/, /chester/supported-devices/modbus/orno-or-we-516/).
  • scripts/overflow-check.py (website-admin) at 320/390/768/1024 px: 0 pages with sideways scroll (before: 46).
  • Homepage screenshots at 320/390/768/1024/1280 px compared before and after.
  • npm run verify:i18n unchanged, npm run build clean.

Not touched: on a 404 page the navbar's current-product label (src/theme/NavbarItem/DropdownNavbarItem) renders on the client but not in the prebuilt 404.html, which also logs #418. It only affects 404s.

🤖 Generated with Claude Code

hubpav and others added 6 commits October 28, 2026 07:40
A <p> on its own line in MDX takes flow children, so it wrapped fenced code
blocks (172, mostly in <details>), paragraphs (114) and two tables. That is
invalid HTML: the minifier and the browser closed the <p> early, React's tree
still had the block inside, and every one of those 168 pages failed hydration
(#418) and re-rendered on the client. The wrapper lines are removed; the
content is unchanged. EN and CS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Image boxes on 23 pages (EN + CS) had a fixed width and height (500, 376,
  250 or 600 px), wider than a phone. They now use maxWidth and let the image
  keep its own aspect ratio: same size from 1,440 px up, fitted to its column
  below that.
- Homepage grids: minmax(0, 1fr) tracks and card images capped at 100 % of the
  card, so the image min-content width no longer widens the page (1,187 px at
  a 1,024 px viewport, 355 px at 320). The four desktop columns are now equal.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The theme listed sidebar hrefs without the trailing slash although every page
is served (and canonical) at /x/. A small override of
DocBreadcrumbs/StructuredData normalises them like the TechArticle url. Both
now treat only a letter-led suffix as a file extension, so a version-number
slug such as bmeters-rfm-tx1.1 gets its slash too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The strip is HARDWARIO.com, Docs, Engineering, Studio, Academy, STEM with the
self-link omitted; docs had no STEM link and no recorded exemption.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
website-hardwario-docs cdfbdb4 Commit Preview URL

Branch Preview URL
Oct 28 2026, 08:32 AM

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hubpav
hubpav merged commit 7f3f07b into main Oct 28, 2026
3 checks passed
@hubpav
hubpav deleted the fix/hydration-footer-breadcrumbs branch November 3, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant