openvibers/openvibe.design Commits

Design's component references name OpenVibe Link (#221)

OP OpenVibers committed 4 days ago · 3234d94059 · 2 files, +15 −5

The Android component specifications still pointed at OpenVibe.Node's OvKit.kt. They now name OpenVibe.Link, and a guard test fails if the old brand returns.

Changes

ddiff --git a/server/components/registry.js b/server/components/registry.js
iindex a401a32..fdfb20d 100644
---- a/server/components/registry.js
++++ b/server/components/registry.js
@@@ -22,15 +22,15 @@ const COMPONENTS = Object.freeze([
define('menu', 'Menu', 'One navigation sheet with its You home and app destinations.', [['trigger', 'opens navigation'], ['you', 'account home'], ['apps', 'destination rows']], { open: 'boolean', person: 'person?', destinations: 'link[]' }, ['closed', 'open', 'signed-out'], ['color.bg.raised', 'color.line.strong', 'size.tap'], { keyboardAware: true, outsideTapCloses: true, scrollLock: true, accessibility: { focus: 'Move focus into the menu; Escape returns it to the trigger' } }, ['navbar', 'OpenVibeNavbar menu and You home'], ['SurfaceContainerHigh', 'Use ModalNavigationDrawer with a You header and app rows.'], 'Use a sheet with a NavigationStack and You header.', { open: true }),
define('you-home', 'You home', 'The personal starting view inside the menu.', [['identity', 'avatar and name'], ['shortcuts', 'your places'], ['settings', 'display and account']], { person: 'person?', shortcuts: 'link[]' }, ['signed-in', 'signed-out', 'loading'], ['color.bg.raised', 'color.text.secondary', 'size.tap'], { keyboardAware: true }, ['navbar', 'Menu You panel'], ['SurfaceContainerHigh', 'Use a Column of ListItem shortcuts under the account identity.'], 'Use a List with account identity and destination sections.', { person: 'You' }),
define('dock', 'Dock', 'Persistent place for the current task, clear of the phone app bar and keyboard.', [['surface', 'bottom container'], ['content', 'current task'], ['action', 'send or confirm']], { content: 'string', action: 'action', busy: 'boolean' }, ['ready', 'busy', 'disabled'], ['color.bg.raised', 'color.line.strong', 'size.tap'], { keyboardAware: true, accessibility: { focus: 'Keep the action after the content in focus order' } }, ['kit', 'kit.dock({ action, name, placeholder, label })'], ['SurfaceContainer', 'Use Scaffold.bottomBar and imePadding; keep the primary action in a 48 dp control.'], 'Use safeAreaInset(edge: .bottom) with keyboard avoidance.', { content: 'Write a message', action: 'Send' }),
-- define('dock-tabs', 'Dock tabs', 'The phone destinations attached to the bottom app bar.', [['tab', 'icon and label'], ['selection', 'active destination']], { items: 'link[]', active: 'string' }, ['default', 'selected', 'pressed'], ['color.accent.strong', 'color.text.muted', 'size.tap'], { keyboardAware: true, accessibility: { name: 'Each tab announces its label and selected state' } }, ['appbar', 'OpenVibeAppbar from the site navigation'], ['SurfaceContainer', 'Reference: OvTabs in OpenVibe.Node\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use NavigationBar with NavigationBarItem and selected state.'], 'Use TabView with system tab items.', { active: 'Studio' }),
++ define('dock-tabs', 'Dock tabs', 'The phone destinations attached to the bottom app bar.', [['tab', 'icon and label'], ['selection', 'active destination']], { items: 'link[]', active: 'string' }, ['default', 'selected', 'pressed'], ['color.accent.strong', 'color.text.muted', 'size.tap'], { keyboardAware: true, accessibility: { name: 'Each tab announces its label and selected state' } }, ['appbar', 'OpenVibeAppbar from the site navigation'], ['SurfaceContainer', 'Reference: OvTabs in OpenVibe.Link\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use NavigationBar with NavigationBarItem and selected state.'], 'Use TabView with system tab items.', { active: 'Studio' }),
define('thread-composer', 'Thread composer', 'A multiline message field with Options, attachments and send or stop.', [['field', 'message text'], ['options', 'model and attachment choices'], ['send', 'submit or stop']], { action: 'url', placeholder: 'string', options: 'action[]', attach: 'boolean', busy: 'boolean' }, ['empty', 'composing', 'uploading', 'busy'], ['color.bg.raised', 'color.text.primary', 'size.tap'], { keyboardAware: true, accessibility: { focus: 'Enter sends when the field permits; Shift+Enter adds a line; Options has a spoken label' } }, ['thread', 'thread.composer({ action, placeholder, attach })'], ['SurfaceContainerHigh', 'Use an OutlinedTextField, Options icon button and send or stop button; imePadding on the dock.'], 'Use TextEditor with an Options Menu and send or stop Button above the keyboard.', { placeholder: 'Ask anything', attach: true }),
define('sheet', 'Sheet', 'A modal task surface: one heading, one close action and scrollable content.', [['handle', 'touch affordance'], ['header', 'title and close'], ['body', 'task controls']], { title: 'string', open: 'boolean', body: 'content' }, ['closed', 'opening', 'open', 'closing'], ['color.bg.raised', 'color.line.strong', 'radius.lg'], { keyboardAware: true, outsideTapCloses: true, scrollLock: true, accessibility: { focus: 'Trap focus while open; Escape closes and returns focus' } }, ['kit', 'kit.sheet({ id, title, body })'], ['SurfaceContainerHigh', 'Use ModalBottomSheet with a heading, close control and sheet state.'], 'Use .sheet with a NavigationStack and a toolbar close button.', { title: 'Add a site' }),
define('popover', 'Popover', 'A small anchored set of choices that closes on outside tap.', [['trigger', 'anchor'], ['choices', 'menu items']], { label: 'string', items: 'action[]', open: 'boolean' }, ['closed', 'open', 'selected'], ['color.bg.raised', 'color.line.strong', 'size.tap'], { keyboardAware: true, outsideTapCloses: true, accessibility: { focus: 'Arrow keys move choices; Escape returns focus to trigger' } }, ['kit', 'kit.more({ label, items })'], ['SurfaceContainerHigh', 'Use DropdownMenu anchored to the trigger.'], 'Use Menu attached to the trigger Button.', { label: 'More' }),
define('keyboard', 'Keyboard behavior', 'Shared focus, Escape and inset rules for controls near the screen edge.', [['focus', 'active input'], ['inset', 'visible keyboard space'], ['dismiss', 'return path']], { focused: 'boolean', returnFocus: 'string?' }, ['idle', 'keyboard-open', 'dismissed'], ['size.tap', 'space.md'], { keyboardAware: true, accessibility: { focus: 'Keep the focused control visible; dismiss without losing the place' } }, ['kit-web', 'Shared focus and form handling'], ['Surface', 'Use WindowInsets.ime and bringIntoViewRequester for focused fields.'], 'Use safeAreaInset and FocusState; scroll the focused field into view.', { focused: true }),
-- define('kit-row', 'Kit row', 'One tappable item with identity, supporting text and a trailing fact or action.', [['mark', 'item identity'], ['text', 'title and supporting line'], ['trail', 'time, count or action']], { title: 'string', sub: 'string?', href: 'url?', mark: 'string?', trail: 'string?' }, ['default', 'hover', 'focused', 'unread'], ['color.bg.raised', 'color.text.primary', 'size.tap'], { accessibility: { name: 'Announce title, supporting text and trailing fact together' } }, ['kit', 'kit.row({ title, sub, href, mark, trail })'], ['SurfaceContainer', 'Reference: OvRow in OpenVibe.Node\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use ListItem with headlineContent, supportingContent and trailingContent.'], 'Use an HStack row inside a List with a full-row tap target.', { title: 'OpenVibe.Live', sub: 'Live now' }),
-- define('kit-card', 'Kit card', 'One content object with media, title and context.', [['media', 'preview or glyph'], ['title', 'primary name'], ['meta', 'supporting facts']], { title: 'string', href: 'url', image: 'url?', badge: 'string?' }, ['default', 'hover', 'focused', 'loading'], ['color.bg.raised', 'color.text.primary', 'radius.md'], { accessibility: { name: 'The whole card is one link named by its title' } }, ['kit', 'kit.card({ title, href, image, badge })'], ['SurfaceContainer', 'Reference: OvCard in OpenVibe.Node\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use Card with a single onClick and semantic title.'], 'Use a Button wrapping a card-shaped VStack.', { title: 'Seattle at night', href: '/live' }),
-- define('kit-section', 'Kit section', 'A named group with an optional note and count.', [['heading', 'group name'], ['note', 'help text'], ['body', 'group content']], { title: 'string', note: 'string?', body: 'content' }, ['default', 'empty'], ['color.bg.raised', 'color.text.primary', 'space.lg'], {}, ['kit', 'kit.section({ title, note, body })'], ['Surface', 'Reference: OvSection in OpenVibe.Node\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use a Column with a heading and grouped content.'], 'Use a Section with a header and optional footer note.', { title: 'Your rooms' }),
-- define('empty-state', 'Empty state', 'A truthful explanation and one next action when a group has no items.', [['glyph', 'context icon'], ['title', 'what is empty'], ['action', 'next step']], { title: 'string', text: 'string?', action: 'action?' }, ['empty', 'loading-resolved'], ['color.text.muted', 'color.accent.strong', 'size.tap'], {}, ['kit', 'kit.empty({ title, text, action })'], ['Surface', 'Reference: OvEmpty in OpenVibe.Node\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use a Column with icon, title and one Button.'], 'Use ContentUnavailableView with one action Button.', { title: 'No sites yet', text: 'Add a site to give it a look.' }),
++ define('kit-row', 'Kit row', 'One tappable item with identity, supporting text and a trailing fact or action.', [['mark', 'item identity'], ['text', 'title and supporting line'], ['trail', 'time, count or action']], { title: 'string', sub: 'string?', href: 'url?', mark: 'string?', trail: 'string?' }, ['default', 'hover', 'focused', 'unread'], ['color.bg.raised', 'color.text.primary', 'size.tap'], { accessibility: { name: 'Announce title, supporting text and trailing fact together' } }, ['kit', 'kit.row({ title, sub, href, mark, trail })'], ['SurfaceContainer', 'Reference: OvRow in OpenVibe.Link\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use ListItem with headlineContent, supportingContent and trailingContent.'], 'Use an HStack row inside a List with a full-row tap target.', { title: 'OpenVibe.Live', sub: 'Live now' }),
++ define('kit-card', 'Kit card', 'One content object with media, title and context.', [['media', 'preview or glyph'], ['title', 'primary name'], ['meta', 'supporting facts']], { title: 'string', href: 'url', image: 'url?', badge: 'string?' }, ['default', 'hover', 'focused', 'loading'], ['color.bg.raised', 'color.text.primary', 'radius.md'], { accessibility: { name: 'The whole card is one link named by its title' } }, ['kit', 'kit.card({ title, href, image, badge })'], ['SurfaceContainer', 'Reference: OvCard in OpenVibe.Link\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use Card with a single onClick and semantic title.'], 'Use a Button wrapping a card-shaped VStack.', { title: 'Seattle at night', href: '/live' }),
++ define('kit-section', 'Kit section', 'A named group with an optional note and count.', [['heading', 'group name'], ['note', 'help text'], ['body', 'group content']], { title: 'string', note: 'string?', body: 'content' }, ['default', 'empty'], ['color.bg.raised', 'color.text.primary', 'space.lg'], {}, ['kit', 'kit.section({ title, note, body })'], ['Surface', 'Reference: OvSection in OpenVibe.Link\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use a Column with a heading and grouped content.'], 'Use a Section with a header and optional footer note.', { title: 'Your rooms' }),
++ define('empty-state', 'Empty state', 'A truthful explanation and one next action when a group has no items.', [['glyph', 'context icon'], ['title', 'what is empty'], ['action', 'next step']], { title: 'string', text: 'string?', action: 'action?' }, ['empty', 'loading-resolved'], ['color.text.muted', 'color.accent.strong', 'size.tap'], {}, ['kit', 'kit.empty({ title, text, action })'], ['Surface', 'Reference: OvEmpty in OpenVibe.Link\'s Android app (android/app/src/main/java/network/openvibe/kit/OvKit.kt). Use a Column with icon, title and one Button.'], 'Use ContentUnavailableView with one action Button.', { title: 'No sites yet', text: 'Add a site to give it a look.' }),
define('switch-row', 'Switch row', 'One setting with a label, explanation and on or off control.', [['label', 'setting name'], ['hint', 'effect of setting'], ['switch', 'current value']], { name: 'string', label: 'string', hint: 'string?', on: 'boolean' }, ['off', 'on', 'disabled'], ['color.bg.raised', 'color.text.primary', 'size.tap'], { accessibility: { name: 'Label and hint describe the switch; announce on or off' } }, ['kit', 'kit.switchRow({ name, label, hint, on })'], ['Surface', 'Use a ListItem with a Material 3 Switch trailing control.'], 'Use Toggle with a supporting text label.', { name: 'contrast', label: 'More contrast', on: false }),
define('segmented-control', 'Segmented control', 'A small exclusive choice set with a visible current value.', [['label', 'choice purpose'], ['segments', 'mutually exclusive values']], { name: 'string', label: 'string', options: 'choice[]', value: 'string' }, ['default', 'selected', 'focused'], ['color.accent.strong', 'color.text.primary', 'size.tap'], { accessibility: { focus: 'Arrow keys move radio choices; announce selected value' } }, ['kit', 'kit.seg({ name, label, options, value })'], ['SecondaryContainer', 'Use SingleChoiceSegmentedButtonRow.'], 'Use Picker with .segmented style.', { name: 'scheme', label: 'Light or dark', value: 'auto' }),
define('upload-progress', 'Upload and progress', 'A file transfer with a truthful determinate meter and cancel action.', [['file', 'name and type'], ['meter', 'bytes sent of total'], ['cancel', 'stop transfer']], { name: 'string', totalBytes: 'number', sentBytes: 'number', cancellable: 'boolean' }, ['queued', 'uploading', 'complete', 'failed', 'cancelled'], ['color.accent.strong', 'color.text.primary', 'size.tap'], { accessibility: { name: 'Announce file name, percent and state without repeating every byte' } }, ['files', 'Shared upload control and progress meter'], ['SurfaceContainer', 'Use LinearProgressIndicator(progress) with state text and cancel IconButton.'], 'Use ProgressView(value:total:) with a cancel Button.', { name: 'photo.jpg', totalBytes: 100, sentBytes: 45 }),
ddiff --git a/test/link-brand.test.js b/test/link-brand.test.js
nnew file mode 100644
iindex 0000000..eaa904f
---- /dev/null
++++ b/test/link-brand.test.js
@@@ -0,0 +1,10 @@
++'use strict';
++const assert = require('node:assert/strict');
++const { spawnSync } = require('node:child_process');
++const path = require('node:path');
++const root = path.resolve(__dirname, '..');
++const oldName = ['OpenVibe[ .-]No' + 'de', 'openvibe-' + 'node', 'no' + 'd_', 'node[.]openvibe[.]network', 'node:lnk_', 'openvibe[.](bot|my|network)/mach' + 'ines'].join('|');
++const result = spawnSync('git', ['grep', '-n', '-I', '-i', '-E', oldName, '--', '.', ':!migrations/**', ':!test/link-brand.test.js'], { cwd: root, encoding: 'utf8' });
++assert.ok(result.status === 0 || result.status === 1, result.stderr || 'git grep failed');
++assert.equal(result.status, 1, `Old Link brand or principal returned:\n${(result.stdout || '').split('\n').slice(0, 10).join('\n')}`);
++console.log(' ok old Link brand and principal IDs are absent');