docs(adr): ADR-0007: Progressive Enhancement as Baseline Requirement
@aRustyDev ci sta già lavorando.
Dal 5/1/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
ADR-0007: Progressive Enhancement as Baseline Requirement
Status
Accepted
Context
HTMX is often misunderstood as "adding JavaScript to make things dynamic." The opposite is true: HTMX enables server-rendered HTML to be enhanced with dynamic behavior while maintaining full functionality without JavaScript.
For documentation sites, this is critical:
- Search engine crawlers may not execute JavaScript
- Users on slow connections benefit from immediate content
- Accessibility tools work better with semantic HTML
- Corporate firewalls sometimes strip JavaScript
Decision Drivers
- Accessibility - Screen readers and assistive tech need working HTML
- SEO - Search engines must index content without JS execution
- Resilience - Sites must work when JS fails/blocks/loads slowly
- HTMX Philosophy - Enhancement, not replacement
Principle
All mdbook-htmx output MUST function completely without JavaScript.
JavaScript (via HTMX) enhances the experience but never underpins it.
Implementation Requirements
1. All Links Must Be Real Links
<!-- ✅ Correct: Works without JS -->
<a href="/docs/chapter-2" hx-boost="true">Chapter 2</a>
<!-- ❌ Wrong: Requires JS to navigate -->
<button hx-get="/docs/chapter-2">Chapter 2</button>
2. Forms Must Submit Normally
<!-- ✅ Correct: Works without JS -->
<form action="/docs/search" method="GET">
<input type="search" name="q" hx-get="/docs/search" hx-trigger="input changed delay:300ms">
<button type="submit">Search</button>
</form>
<!-- ❌ Wrong: No fallback action -->
<input hx-get="/docs/search" hx-trigger="keyup">
3. Full Pages Must Be Complete
The pages/ directory contains fully-rendered HTML documents:
<!DOCTYPE html>
<html>
<head>
<title>Chapter 2 - My Book</title>
</head>
<body>
<nav><!-- Full navigation --></nav>
<main id="content">
<article><!-- Full content --></article>
</main>
</body>
</html>
No <noscript> fallbacks needed - the page IS the fallback.
4. Content-First Loading
<!-- ✅ Correct: Content loads, then enhances -->
<body hx-boost="true">
<!-- All content present in initial HTML -->
</body>
<!-- ❌ Wrong: Content loaded via JS -->
<body>
<div hx-get="/content" hx-trigger="load"></div>
</body>
5. Lazy Loading Is Progressive
Lazy-loaded sections must show meaningful placeholder content:
<!-- ✅ Correct: Placeholder is usable -->
<section hx-get="/docs/examples" hx-trigger="revealed">
<p>Examples are loading... <a href="/docs/examples">View examples page</a></p>
</section>
<!-- ❌ Wrong: Empty until JS loads -->
<section hx-get="/docs/examples" hx-trigger="revealed"></section>
Verification Checklist
For every generated page, verify:
- Page renders complete content with JS disabled
- All navigation links work without JS
- Search form submits and returns results without JS
- Sidebar displays full chapter list without JS
- No empty containers that require JS to populate
- No
<noscript>tags (they indicate broken baseline)
Testing
# Chrome DevTools: Disable JavaScript
# Settings > Preferences > Debugger > Disable JavaScript
# Or via CLI
curl -s https://docs.example.com/chapter-1 | grep -c "<article>"
# Should return 1 (content present)
Consequences
Positive
- Works everywhere: slow networks, corporate proxies, screen readers
- SEO-friendly: crawlers see full content
- Fast First Contentful Paint: no JS blocking
- Resilient: partial JS failures don't break navigation
Negative
- Slightly larger initial HTML (full content vs skeleton)
- Server must render complete pages, not just fragments
- Some dynamic features need careful design (e.g., live search needs form fallback)
References
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aRustyDev/mdbook-htmx
-
feat(ci): Implement cross-repo-validate compliance for docs syncForse di nuovo libera @aRustyDev l’ha presa 285 giorni fa e non c’è nessuna pull request aperta. Apertaci enhancement
aRustyDev/mdbook-htmx#58 · 1 commento · 1 assegnatario ·
-
docs(htmx): Explain how HTMX worksForse di nuovo libera @aRustyDev l’ha presa 287 giorni fa e non c’è nessuna pull request aperta. Aperta
aRustyDev/mdbook-htmx#48 · 3 commenti · 1 assegnatario ·
-
docs(mdbook-htmx): Parent Issue for documentationForse di nuovo libera @aRustyDev l’ha presa 287 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
aRustyDev/mdbook-htmx#47 · 1 assegnatario ·
-
docs(examples): Secure Self-Hosted Meilisearch via CloudflareForse di nuovo libera @aRustyDev l’ha presa 287 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
aRustyDev/mdbook-htmx#46 · 1 assegnatario ·
-
docs(examples): Kubernetes with MeilisearchForse di nuovo libera @aRustyDev l’ha presa 287 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
aRustyDev/mdbook-htmx#45 · 1 assegnatario ·
Tutte le issue di aRustyDev/mdbook-htmx
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue gpu serve
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
biomejs/biome#12475 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
documentation E-easy good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno