openvibers/openvibe.wiki Commits

Render Wiki navigation in server HTML (#272)

OP OpenVibers committed 3 days ago · 0cd6f278e5 · 6 files, +14 −13

* Render Wiki navigation in server HTML

* Align Wiki status and no-JS checks with Shared

* Update Wiki Shared version docs

Changes

ddiff --git a/README.md b/README.md
iindex 827dd8e..b71a704 100644
---- a/README.md
++++ b/README.md
@@@ -319,7 +319,7 @@ Production: `/opt/openvibe.wiki`, env `/etc/openvibe/wiki.env`, unit
- PostgreSQL 18 and Valkey 9 (OpenVibe.Host `roles/data/`, ADR-035): every read and write is async through
`openvibe-sdk/db`; Valkey holds the per-actor limit counters (optional: without `VALKEY_URL` they count per process).
- `openvibe-publishing` v1.7.0 (async PostgreSQL stores, ingest and publication chassis), `openvibe-contracts`
-- v0.379.0, `openvibe-shared` v4.179.0
++ v0.379.0, `openvibe-shared` v4.184.0
(Frame, release, metrics, readiness, SEO helpers, legal pages), `openvibe-sdk` v0.132.0 (db, auth, PostgreSQL
events outbox, per-actor limits, account export and deletion, testing) — pinned release tarballs.
- OpenVibe.Network (SSO, JWKS, service principal `wiki`), OpenVibe.Events, OpenVibe.Community,
@@@ -449,6 +449,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.384.0
- openvibe-sdk: v0.132.0
--- openvibe-shared: v4.179.0
++- openvibe-shared: v4.184.0
- openvibe-publishing: v1.7.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 411d776..7649e89 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,10 +9,10 @@
"domain": "openvibe.wiki",
"contracts": "openvibe-contracts v0.384.0",
"sdk": "openvibe-sdk v0.132.0",
-- "shared": "openvibe-shared v4.179.0",
++ "shared": "openvibe-shared v4.184.0",
"packages": [
"openvibe-publishing v1.7.0",
-- "openvibe-shared v4.179.0",
++ "openvibe-shared v4.184.0",
"openvibe-sdk v0.132.0"
],
"capabilities": [
ddiff --git a/package-lock.json b/package-lock.json
iindex 8a48f63..96bbb0c 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -17,7 +17,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.7.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.132.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.184.0",
"pg": "^8.23.0"
},
"devDependencies": {
@@@ -1196,9 +1196,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.179.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
-- "integrity": "sha512-Fjffjq3gLINhiXTqQJwsKQT/QbV4TYvsmz6GTp5hBJ8xA6KUQgu0wDgCQ3BRxCZ0ehmn0HGVAHUI+5m0LtPQCQ==",
++ "version": "4.184.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.184.0",
++ "integrity": "sha512-e5fwc+ywZUVNQhv9gFIcuRch5NbQyxwEWs+OyA80UodJR7WjQ+4cX1xdB1muk2RNzc1vgt++q32dkx45xlGy7A==",
"license": "MIT",
"dependencies": {
"jsonwebtoken": "^9.0.0",
ddiff --git a/package.json b/package.json
iindex 31d30c9..42b5a08 100644
---- a/package.json
++++ b/package.json
@@@ -28,7 +28,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.7.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.132.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.184.0",
"pg": "^8.23.0"
},
"engines": {
ddiff --git a/test/layout.test.js b/test/layout.test.js
iindex 1fe69fe..51e2892 100644
---- a/test/layout.test.js
++++ b/test/layout.test.js
@@@ -3,7 +3,7 @@
* The page shell (server/render/layout.js): every page is openvibe-publishing/layout's document
* (openvibe-shared/shell page()): one title, the canonical, robots exactly as the page passed it (the
* gate's decision for an article, noindex for editing surfaces), JSON-LD, the feed links, the
-- * stylesheets, the network app icon, the Frame (navbar mount, noscript navigation, the
++ * stylesheets, the network app icon, the Frame (server navbar mount, the
* server-rendered footer and its init) and the boost marker.
*/
const assert = require('assert');
@@@ -25,8 +25,9 @@ function frameOf(html, where) {
assert.ok(/<link rel="[^"]*icon[^"]*"/.test(head), `${where}: the app icon tags`);
assert.ok(/<meta name="ov-boost" content="wiki@[^"]+">/.test(head), `${where}: the boost marker`);
assert.ok(/<script src="\/shared\/boost\.js\?v=[0-9a-f]+" data-main="#main" defer><\/script>/.test(head), `${where}: the boost script`);
-- assert.ok(body.includes('<div id="navbar-mount"></div>'), `${where}: the navbar mount`);
-- assert.ok(body.includes('<noscript><nav'), `${where}: the noscript navigation`);
++ assert.ok(body.includes('<div id="navbar-mount"><nav class="openvibe-navbar" aria-label="Site"'), `${where}: the server navbar mount`);
++ assert.ok(body.includes('data-ov-nav-link="true" href="/">Wikis</a>'), `${where}: the home link is in server HTML`);
++ assert.ok(body.includes('data-ov-nav-link="true" href="/recent">Recent changes</a>'), `${where}: recent changes is in server HTML`);
assert.ok(body.includes('id="ov-footer"'), `${where}: the server-rendered footer`);
assert.ok(body.includes('OpenVibeFooter.init(window.__OV_PAGE.footer)'), `${where}: the footer is initialised`);
assert.ok(body.includes('<header class="wk-bar">'), `${where}: the site header`);
ddiff --git a/test/nojs.test.js b/test/nojs.test.js
iindex 7515101..29404ab 100644
---- a/test/nojs.test.js
++++ b/test/nojs.test.js
@@@ -18,7 +18,7 @@ const stripScripts = (html) => html.replace(/<script[\s\S]*?<\/script>/g, '');
let r = await H.req(h, 'GET', '/');
assert.strictEqual(r.status, 200);
assert.ok(r.text.includes('Sign in with OpenVibe'));
-- assert.ok(r.text.includes('<noscript><nav'), 'a navigation exists without the JavaScript navbar');
++ assert.ok(r.text.includes('<div id="navbar-mount"><nav class="openvibe-navbar" aria-label="Site"'), 'a navigation exists in server HTML without JavaScript');
r = await H.req(h, 'GET', '/new-space');
assert.strictEqual(r.status, 401);
assert.ok(r.text.includes('/auth/login?next=%2Fnew-space'));