Name:
[IMP] viin_brain,viin_web_editor: Brain core UI polish wave — runtime bug + a11y/responsive
State:
Killed
finished in 299m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#37
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
7ee9f9ff1ba8d57585ab0c053ac258cd0325f84b
Description:
[IMP] viin_brain,viin_web_editor: Brain core UI/UX polish wave
Squashed integration of the Brain core polish wave (branch
wave/integration-brain-polish-w1): runtime bug fixes, theme repair,
a11y/responsive, the form-sidebar quick-create drawer reworked onto the
native web_editor editor, plus JS/behaviour tests and doc sync. Scope is
viin_brain + viin_web_editor only; rebased on origin/17.0.
Added
- Quick-create drawer note body now mounts the native web_editor Wysiwyg
(OdooEditor), lazy-loaded from web_editor.backend_assets_wysiwyg, working
on in-memory HTML (no persisted page) so the create-on-save/discard flow
is preserved; body saved into content_html. First surface delegated to the
audited editor per ADR-003 Path B (PageEditor migration stays P16).
- Responsive 3-pane layout (_responsive.scss): tablet 2-pane with the
context pane as an overlay; phone single-pane with a slide-in sidebar
drawer and ellipsised title.
- A11y: <main role="main"> landmark, page-title aria-label, disabled
"Related" tab aria-disabled + tabindex=-1; header hamburger toggles the
sidebar; timeline icon corrected.
Changed
- Form sidebar lists notes LINKED to a record, not only inline @-mentions:
_brain_mentioning_page_ids unions viin.brain.link record-mentions with
viin.brain.page.record.link rows, and _compute_brain_page_count uses the
same union via a distinct page-id set (no double count) with ACL filtering.
- "Link a record" replaced by a friendly two-step "Link a document" picker
(core ModelSelector + RecordSelector); model:id output contract unchanged.
- Filter pills compacted to a single scrolling row; panel/graph bars wrap
instead of overflowing in the ~300px context pane.
Fixed
- Theme token system repair (theme_tokens.scss): Odoo 17 emits no --bs-*
runtime properties and the prior self-referential shims formed a CSS
cycle resolving empty (theme-blind UI); redefined non-self-referentially
from live Odoo vars with literal fallbacks.
- OWL this-binding crashes in bare inline arrow handlers (drawer vault /
entry-kind clicks, calendar view, moderation panel).
- Form sidebar layout is resize-reactive: ui service useState-wrapped so
layoutMode recomputes on viewport change.
- Share dialog reveals the public URL on save + .bind toggle; template
dialog body moved to the Dialog default slot; sidebar label live-updates
on rename via a brain-page-renamed bus event; removed the hardcoded "P12"
badge; badges migrated to text-bg-secondary.
- viin_web_editor: removed the spike powerbox demo commands
(viin_spike_hello / viin_spike_block + brain category); registries ship
empty; embedded_component_host docstring repointed to native_commands.js.
Tests
- Drawer tour (crash guards + native Wysiwyg mount + Save) with a Python
runner asserting the server outcome; BrainFormSidebar layout + resize
reactivity unit tests; backend tests for the linked-notes union. Verified
on a clean pg16 DB: drawer tour green, backend suites green.
Docs
- CHANGELOG [Unreleased] entries (viin_brain + viin_web_editor); README
"what's new"/responsive/sidebar updates; contenteditable_policy.md
reconciled (Path-B delegated surface, status, change history).
Branch:
17.0
Instance ID:
0
Age:
Up-time: