The SPA loaded mapbox-gl.js + geocoder as render-blocking <script> in <head> (~1.2MB blocking parse) with no preconnect/preload — the ~10s cold load. Now: defer both (the app module runs after them in doc order, so window.mapboxgl is still ready at mount), preconnect api.mapbox.com + pray.doxa.life, and modulepreload the default profile bundle so mapbox+bundle+API fetch in parallel. Measured headless: time-to-chrome 562ms, time-to-widget 1068ms (was ~10s). Embed pages get preconnect too (kept mapbox sync there since they use inline, non-module scripts). |
||
|---|---|---|
| .. | ||
| app-wrapper-material | ||
| pane-wrapper | ||
| README.md | ||
layouts/ — app wrappers
Each folder here is an app wrapper: a host shell that composes doxa-maps app-profiles (the independently-built custom elements) into one application.
layouts/<wrapper>/ ← the HOST page (not a bundle)
┌──────────┬──────────────────────────────┐
│ sidebar │ mounts an app-profile here │
│ (nav.js) │ ┌──────────────┐ │
│ ├ item │ │ <doxa-map> │ ← a │
│ ├ section│ │ (a bundle) │ micro- │
│ └ folder │ └──────────────┘ frontend │
└──────────┴──────────────────────────────┘
- app-profile = a self-contained custom element (the micro-frontend). app wrapper = the host that mounts them and provides nav/chrome. A wrapper is a host page, not a bundle-in-a-bundle.
- Wrappers today:
app-wrapper-material/,pane-wrapper/. - Icons are inline SVG only (no CDN) — an F-Droid/offline hard requirement.
Sidebar contract, target filtering, sidebar modes, staging: ../docs/architecture/app-wrappers.md.