Name: [IMP] viin_brain,viin_web_editor: Brain core UI polish wave — runtime bug + a11y/responsive

State: Killed

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #37

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 5684444aaaaeb986af27d47f6d7ff1c98d4e66de

Description:

                                            [FIX] viin_brain: form-sidebar drawer crashes + inline note body + header padding

Review of the Brain form sidebar (sale.order / res.partner) surfaced three issues:

1. Create-drawer crashes (same unbound-`this` class as the share-dialog fix):
   `t-on-click="() => onVaultSelect(vault.id)"` / `() => onEntryKindSelect(...)`
   call a BARE method inside an inline arrow, so OWL invokes it without the
   component as `this` → "Cannot read properties of undefined (reading 'state')"
   when picking a vault or an entry kind. Swept the whole class: every
   `=> onXxx(` arrow handler now uses `=> this.onXxx(` (9 sites across
   brain_create_drawer, brain_form_sidebar [onOpenPage — would crash on a linked
   page click], moderation_panel, database_calendar_view drag/drop).

2. Header "too close to the left": the form-sidebar header rendered with NO
   padding. Root cause — `padding: … calc(map-get($spacers, 2) * 0.75)`: SCSS
   does NOT evaluate `map-get()` inside a CSS `calc()`, so it compiled to the
   literal `calc(map-get($spacers, 2) * 0.75)` — invalid, which makes the
   browser drop the ENTIRE padding declaration → 0 padding. Same class as the
   earlier LibSass `min()` regression. Fixed by letting Sass compute the value
   directly: `(map-get($spacers, 2) * 0.75)` → `padding: 8px 16px 6px`.

3. Note body not editable inline (had to leave the form for the Brain app — a
   UX failure when the note must reference the open record): the create drawer
   now has an inline body textarea; its content is saved as `content_html` on
   creation (the page model syncs content_plain/blocks), so the user writes the
   note while the record stays on screen. "Save & Open in Brain" still available
   for rich editing.

Verified live (res.partner form): vault + entry-kind selection no longer crash;
note created with body content + entry_kind + record link; header padding renders.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: Not finished