openvibers/openvibe.shared Commits

4.84.0: the shell's page has the network's type by default (#238)

OP OpenVibers committed 12 days ago · 698f68f742 · 6 files, +20 −6

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 3b0cde1..7037c64 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -4,6 +4,14 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semve
breaking change to any exported module, browser global or served file name is a new major.
A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).
++## 4.84.0 — 2026-11-01
++
++- **A page with no stylesheet of its own reads in the network's type.**
++ - `shell.page` set no font. On five sites (Events, Run, AI, Bot, Games), `/updates` loads no stylesheet, and its text
++ fell back to the browser's Times New Roman.
++ - The head's reserve style now gives the body `var(--ov-font, 'Inter', system sans)` through `:where(body)`. At zero
++ specificity, any site's own body rule wins, so nothing changes on a page that already sets its font.
++
## 4.83.0 — 2026-11-01
- **Status words read on light themes.**
ddiff --git a/README.md b/README.md
iindex 2416a77..55d6f96 100644
---- a/README.md
++++ b/README.md
@@@ -2,7 +2,7 @@
> Versioned UI, the OpenVibe Frame (the navbar, footer and "shipped" views every site sits in), SEO, legal and release-client packages every OpenVibe site renders.
--**Status:** alpha, v4.83.0 (every release is a tag; see [CHANGELOG.md](CHANGELOG.md)). Every deployed
++**Status:** alpha, v4.84.0 (every release is a tag; see [CHANGELOG.md](CHANGELOG.md)). Every deployed
consumer installs a tagged release and none keeps a vendored copy
([docs/migration-plan.md](docs/migration-plan.md) is done); each repository's `package.json` names
the tag it pins.
ddiff --git a/STATUS.json b/STATUS.json
iindex f499aaf..f6c65fe 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -4,7 +4,7 @@
"code": true,
"wave": "W2",
"package": "openvibe-shared",
-- "version": "4.83.0",
++ "version": "4.84.0",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026)",
"deployed": false,
"deployment": "none of its own: a package released as git tags; OpenVibe.Network serves /shared/* from its pinned tag, and a site can serve its own pinned copy (openvibe-shared/serve)",
ddiff --git a/package.json b/package.json
iindex c299c5e..54e2790 100644
---- a/package.json
++++ b/package.json
@@@ -1,6 +1,6 @@
{
"name": "openvibe-shared",
-- "version": "4.83.0",
++ "version": "4.84.0",
"description": "Shared navbar, footer, themes, icons, legal pages, SEO, auth and analytics for every OpenVibe site",
"main": "index.js",
"bin": {
ddiff --git a/shell.js b/shell.js
iindex 3e37ede..6a80459 100644
---- a/shell.js
++++ b/shell.js
@@@ -119,8 +119,10 @@ function manifestLinks(o) {
// The shared navbar's script is deferred and mounts into the page's #navbar-mount: the mount holds the bar's 52px from
// the first paint so the page does not drop when it lands (layout shift), and without JavaScript it goes away. The body
// has no browser margin, so the Frame's navbar and footer meet the window's edges on a page with no stylesheet of its own
--// (openvibe.events and openvibe.bot showed an 8px frame around the footer).
--const NAVBAR_RESERVE = '<style>body{margin:0}#navbar-mount{min-height:52px}</style><noscript><style>#navbar-mount{display:none}</style></noscript>';
++// (openvibe.events and openvibe.bot showed an 8px frame around the footer). The same page also had no font: its text fell
++// back to the browser's Times New Roman (five sites' /updates, 2026-11-01), so the body gets the network's type at zero
++// specificity, which any site's own rule beats.
++const NAVBAR_RESERVE = '<style>body{margin:0}:where(body){font-family:var(--ov-font,\'Inter\',-apple-system,BlinkMacSystemFont,\'Segoe UI\',Roboto,\'Helvetica Neue\',Arial,sans-serif)}#navbar-mount{min-height:52px}</style><noscript><style>#navbar-mount{display:none}</style></noscript>';
function page(o = {}) {
const name = o.name || o.service || 'OpenVibe';
ddiff --git a/test/shell.test.js b/test/shell.test.js
iindex 503cb16..06af92b 100644
---- a/test/shell.test.js
++++ b/test/shell.test.js
@@@ -27,7 +27,11 @@ assert.match(html, /<footer id="ov-footer"/, 'shared footer present');
assert.ok(html.includes('<main id="hero">Hello</main>'), 'body kept verbatim');
assert.ok(html.includes('<script src="/shared/theme-loader.js?v='), 'theme-loader via serve.url');
// The deferred navbar lands in a #navbar-mount that already holds its height; without JavaScript the mount goes away.
--assert.ok(html.includes('<style>body{margin:0}#navbar-mount{min-height:52px}</style><noscript><style>#navbar-mount{display:none}</style></noscript>'), 'navbar mount reserved, and no browser margin around the body');
++assert.ok(html.includes('#navbar-mount{min-height:52px}</style><noscript><style>#navbar-mount{display:none}</style></noscript>'), 'navbar mount reserved');
++assert.ok(html.includes('<style>body{margin:0}'), 'no browser margin around the body');
++// A page with no stylesheet of its own reads in the network's type, not the browser's serif (4.84.0), and at zero
++// specificity, so a site's own body rule always wins.
++assert.ok(html.includes(":where(body){font-family:var(--ov-font,'Inter',"), 'the base font, at zero specificity');
assert.ok(html.indexOf('#navbar-mount{min-height:52px}') < html.indexOf('</head>'), 'in the head, before the first paint');
// ── Script order: theme-loader first (eager); the runtime after it (deferred) ─────────────────────