openvibers/openvibe.food Commits

openvibe-shared v4.228.0 (was v4.225.0) (#299)

OP OpenVibers committed 17 h ago · 030c616d18 · 8 files, +23 −22

* openvibe-shared v4.228.0 (was v4.225.0)

Opened by scripts/pin-bump.js in OpenVibers/OpenVibe.Shared after the v4.228.0 release.

* Home: the pick block is Shared's showcase.pick(), tabs on a phone; the old chips only jumped, so every pane showed

* Tests: an unversioned asset revalidates after five minutes (openvibe-shared 4.227.0 cache-policy)

* Perf budgets: the phone tabs (openvibe-shared 4.228.0, ov-parts.css)

Changes

ddiff --git a/README.md b/README.md
iindex 43cb19e..f2aa634 100644
---- a/README.md
++++ b/README.md
@@@ -296,6 +296,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.417.0
- openvibe-sdk: v0.161.0
--- openvibe-shared: v4.225.0
++- openvibe-shared: v4.228.0
- openvibe-publishing: v1.7.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex b4643f3..ba73f9b 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,11 +9,11 @@
"domain": "openvibe.food",
"contracts": "openvibe-contracts v0.417.0",
"sdk": "openvibe-sdk v0.161.0",
-- "shared": "openvibe-shared v4.225.0",
++ "shared": "openvibe-shared v4.228.0",
"packages": [
"openvibe-contracts v0.417.0",
"openvibe-sdk v0.161.0",
-- "openvibe-shared v4.225.0"
++ "openvibe-shared v4.228.0"
],
"summary": "OpenVibe.Food — What should we eat? Food near you (food banks, pantries and budget grocery stores from OpenStreetMap, paced and cached to stay inside the OSM usage policies), a deterministic meal planner with a shopping list and an estimated cost, a 42-item food database with nutrition per serving and per 100 g, and a pantry with a plain 'what can I make' against ten basic recipes. Server-rendered pages, an API at /api/v1, per-caller limits on the place search, and a test suite that never calls the internet.",
"works": [
ddiff --git a/package-lock.json b/package-lock.json
iindex 416fa5d..e08f740 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -18,7 +18,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.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.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
"pg": "^8.23.0"
},
"devDependencies": {
@@@ -1290,9 +1290,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.225.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
-- "integrity": "sha512-zuZIgYODwJJ7UpDBTVnT+czEI5l6YFWqt1nbfbPeEsW6/NlmDZHJWPSGpBv223jRpvhJYH7Duea6nuRr8KZ3sg==",
++ "version": "4.228.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
++ "integrity": "sha512-HR0Hac/K+qKmwMf2QZWCFxW+uVja36nyAtxVbNFgPGUDFdmWhmb6RMoP/CkU0+GSCPsC50k6aTS+oPx2czDgGg==",
"license": "MIT",
"dependencies": {
"clean-css": "^5.3.3",
ddiff --git a/package.json b/package.json
iindex 88cad9c..2b1ac87 100644
---- a/package.json
++++ b/package.json
@@@ -25,7 +25,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.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.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
"pg": "^8.23.0"
},
"engines": {
ddiff --git a/server/render/short.js b/server/render/short.js
iindex 554f950..04a3776 100644
---- a/server/render/short.js
++++ b/server/render/short.js
@@@ -1,4 +1,5 @@
'use strict';
++const { pick } = require('openvibe-shared/showcase');
/**
* The home on a phone (the owner's rule, 2026-10-31: never hide content to shorten): every block is shown, stacked,
* each with its own heading. The chips are links that jump to a block.
@@@ -18,11 +19,11 @@ const esc = (s) => String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</
*
* pickBlock({ key, label, head, panes }) panes: [{ id, label, html }]
*/
--function pickBlock({ key, label, head = '', panes }) {
-- if (!panes.length) return '';
-- const chips = panes.map((p) => `<a class="pick-chip" href="#pp-${esc(key)}-${esc(p.id)}">${esc(p.label)}</a>`).join('');
-- const body = panes.map((p) => `<div class="pick-pane" id="pp-${esc(key)}-${esc(p.id)}">${p.html}</div>`).join('');
-- return `<div class="pick" id="pick-${esc(key)}"><div class="pick-bar sc-sec"><div class="pick-head"><h2>${esc(head || label)}</h2></div><nav class="pick-row" aria-label="${esc(label)}">${chips}</nav></div><div class="pick-body">${body}</div></div>`;
++// 4.228.0: Shared's showcase.pick() draws the block (tabs on a phone, every pane in the page, a link to a pane opens
++// it); this copy only jumped to a pane with chips, so a phone showed them all (the owner, 11-12). The ids are this
++// site's own, so its links keep working.
++function pickBlock({ key, label, head = '', headId = '', bodyClass = '', panes, checked = '' }) {
++ return pick({ key, label, head, headId, bodyClass, checked: checked ? `pp-${key}-${checked}` : '', panes: (panes || []).map((p) => ({ id: `pp-${key}-${p.id}`, label: p.label, html: p.html })) });
}
/**
ddiff --git a/test/asset-cache.test.js b/test/asset-cache.test.js
iindex f400022..fb0e973 100644
---- a/test/asset-cache.test.js
++++ b/test/asset-cache.test.js
@@@ -3,7 +3,7 @@
* The one cache rule the service serves assets with (openvibe-shared/cache-policy, plan T11): a URL
* whose ?v= is the asset's current hash is immutable for a year, because those bytes can never
* change under the same URL; a wrong or missing ?v= may change at any moment, so it gets the
-- * short public window with a day of stale-while-revalidate. The values are pinned here against
++ * short public window with five minutes of stale-while-revalidate. The values are pinned here against
* the module, not re-stated: the service never picks its own numbers.
*/
const assert = require('assert');
@@@ -12,7 +12,7 @@ const { assetVersion } = require('../server/render/layout');
const { boot, check, done } = require('./helpers/boot');
const ASSET = 'css/app.css';
--const SHORT = 'public, max-age=300, stale-while-revalidate=86400';
++const SHORT = 'public, max-age=300, stale-while-revalidate=300';
(async () => {
const t = await boot();
ddiff --git a/test/home-short.test.js b/test/home-short.test.js
iindex c7a075a..d58524d 100644
---- a/test/home-short.test.js
++++ b/test/home-short.test.js
@@@ -16,9 +16,9 @@ const { boot, check, done } = require('./helpers/boot');
const page = r.text;
const block = page.slice(page.indexOf('<div class="pick" id="pick-food">'), page.indexOf('<details class="home-fold"><summary>Everything food'));
assert.ok(block.startsWith('<div class="pick" id="pick-food">'), 'the pick block is on the home');
-- assert.ok(!/<input type="radio"/.test(block), 'no radio in the pick block');
-- assert.match(block, /<nav class="pick-row" aria-label="What to eat, and what it costs">/);
-- const chips = [...block.matchAll(/<a class="pick-chip" href="#(pp-food-[a-z]+)">[^<]+<\/a>/g)];
++ assert.ok(/<input type=\"radio\" class=\"ov-parts-r\"[^>]* checked>/.test(block), 'the first part is open on a phone (Shared pick(): tabs, 11-12)');
++ assert.match(block, /<div class=\"ov-parts ov-parts--front\" data-parts=\"\d+\">/, 'its parts are tabs on a phone');
++ const chips = [...block.matchAll(/<label for="ovp-[a-z0-9]+-(pp-food-[a-z]+)">[^<]+(?: <span class="ov-parts-n">[^<]*<\/span>)?<\/label>/g)];
assert.ok(chips.length >= 6, `a link per block (${chips.length})`);
// Every block stays in the page, with its heading, and every link points at one of them.
for (const h of ['The most food for a dollar', 'The cheapest protein', 'Browse the food list', 'Every delivery app at once', 'Meal kits, side by side', 'Find a food bank']) {
ddiff --git a/test/perf-budget.test.js b/test/perf-budget.test.js
iindex 5b4caf6..aa62963 100644
---- a/test/perf-budget.test.js
++++ b/test/perf-budget.test.js
@@@ -20,16 +20,16 @@ const BUDGETS = {
// Raised 2026-10-22 for the curated home (the owner's "rich content on the home page"): the most food for a dollar,
// the cheapest protein, the food groups, every delivery app with a search, the meal kits, food banks by city, the
// questions, ItemList + FAQPage JSON-LD, and css/home.css. Measured 43.3/9.8 KB HTML (empty library) and 22.2/5.3 KB CSS.
-- htmlRawKB: 62.5, // 62.5 openvibe-shared v4.202.0 (2026-11-11: measured 62.1, raised by pin-bump from 60.5); 2026-11-11: openvibe-shared 4.190.0 (the site name's dropdown, the footer's online strip, the balances pill); 56.1 with openvibe-shared 4.66.0: the mark with depth and motion, ov-fx loaded on request (2026-10-31); 54.1 with the home's pick block (the owner's short-pages rule, 2026-10-30: the chips and the blocks' wrappers); 49.2 openvibe-shared 4.15 footer: the compact footer opens into the whole one, and the pulse line; 43.3 on 2026-10-22; measured 28.7 with plan together as the sixth feature (2026-10-15); 27.6 with Shared 4.1.0's manifest + apple-touch-icon links (24.9 before; the home page: hero, features, steps, cta, JSON-LD)
++ htmlRawKB: 64, // 64 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 62.5 openvibe-shared v4.202.0 (2026-11-11: measured 62.1, raised by pin-bump from 60.5); 2026-11-11: openvibe-shared 4.190.0 (the site name's dropdown, the footer's online strip, the balances pill); 56.1 with openvibe-shared 4.66.0: the mark with depth and motion, ov-fx loaded on request (2026-10-31); 54.1 with the home's pick block (the owner's short-pages rule, 2026-10-30: the chips and the blocks' wrappers); 49.2 openvibe-shared 4.15 footer: the compact footer opens into the whole one, and the pulse line; 43.3 on 2026-10-22; measured 28.7 with plan together as the sixth feature (2026-10-15); 27.6 with Shared 4.1.0's manifest + apple-touch-icon links (24.9 before; the home page: hero, features, steps, cta, JSON-LD)
htmlBrotliKB: 13.5, // 13.5 openvibe-shared v4.202.0 (2026-11-11: measured 13.1, raised by pin-bump from 13); 11.1 Shared 4.15.1 footer; 9.8 on 2026-10-22; 7.0 (6.2 before 4.1.0)
jsFiles: 5, // 5 (theme-loader, web-runtime, navbar, footer, boost: openvibe-shared/shell)
jsRawKB: 394.5, // 394.5: measured 394.1 with openvibe-shared 4.197.0 (2026-11-10: the menu's row of places, the You tab's row, the Sign in mark, the tooltip); 2026-11-11: openvibe-shared 4.190.0 (the site name's dropdown, the footer's online strip, the balances pill); 376.4: measured 376.3 KB raw with openvibe-shared 4.186.0 (2026-11-10: the mark's Working and Thinking states, the Dock and the menu as one sheet, bare controls styled by the loader); 375.1: measured 367.1 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
jsBrotliKB: 94, // 2026-11-11: openvibe-shared 4.190.0 (the site name's dropdown, the footer's online strip, the balances pill); 89.8: measured 89.7 KB brotli with openvibe-shared 4.186.0 (2026-11-10: the mark's Working and Thinking states, the Dock and the menu as one sheet, bare controls styled by the loader); 89.5: measured 87.5 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
-- cssFiles: 3, // 3 (app.css, the cached /shared/showcase.css and css/home.css)
++ cssFiles: 4, // 4 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 3 (app.css, the cached /shared/showcase.css and css/home.css)
// 16.4 since the product's own pages brought their stylesheet with them (the search and plan forms, the place
// cards, the pantry's tick list); app.css itself stayed within a few lines.
-- cssRawKB: 51.5, // 51.5: measured 46.5 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
-- cssBrotliKB: 10.5, // 9.9 with 2026-11-01: phone table cards (2026-11-01); 8.9 with openvibe-shared 4.48.0 (the site switcher on the mark, the menu's Start tab and quick tools; Kit's touch hit areas and the phone navbar fix, 4.44-4.47.3); 8.6 with 11 touch targets (2026-10-29: the chips and the food search's fields at 44 px); 8.2 the home's phone limits and fold (2026-10-29); 6.4 with Shared 4.13.0 (2026-10-26: account links); 5.3 with css/home.css; 4.3 with the hero search panel
++ cssRawKB: 65, // 65 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 55.5 openvibe-shared v4.228.0 (2026-11-12: measured 55.4, raised by pin-bump from 51.5); 51.5: measured 46.5 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
++ cssBrotliKB: 11.5, // 11.5 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 9.9 with 2026-11-01: phone table cards (2026-11-01); 8.9 with openvibe-shared 4.48.0 (the site switcher on the mark, the menu's Start tab and quick tools; Kit's touch hit areas and the phone navbar fix, 4.44-4.47.3); 8.6 with 11 touch targets (2026-10-29: the chips and the food search's fields at 44 px); 8.2 the home's phone limits and fold (2026-10-29); 6.4 with Shared 4.13.0 (2026-10-26: account links); 5.3 with css/home.css; 4.3 with the hero search panel
externalFiles: 0, // 0
};