Skip to content

[IMP] dms: UX modernisation (kanban density + dashboard + side-pane preview + form heroes + portal grid + test coverage)#3

Open
dnplkndll wants to merge 1 commit into
19.0-mig-dmsfrom
19.0-imp-dms-ux
Open

[IMP] dms: UX modernisation (kanban density + dashboard + side-pane preview + form heroes + portal grid + test coverage)#3
dnplkndll wants to merge 1 commit into
19.0-mig-dmsfrom
19.0-imp-dms-ux

Conversation

@dnplkndll
Copy link
Copy Markdown

@dnplkndll dnplkndll commented May 21, 2026

Comprehensive UX modernisation of OCA dms for 19.0, stacked on top of the in-flight OCA/dms#475 MIG. Fork-only — exists for runboat preview + stakeholder review while we iterate. Subsets will be split into focused upstream PRs once OCA#475 lands and the 19.0.1.0.0 wheel publishes.

What's shipped

Phase 1 — kanban density (comfortable / compact / list)

Per-density layout, floating toggle in the top-right, selection persisted per browser via localStorage. Reuses the existing mime-aware icon_url field.

Phase 2 — Directories landing dashboard

Stat bar above the kanban grid: Files / Storage / New today, each with a 30-day daily sparkline (line for files, bar for storage) and a 24-hour line for "new today" plus week-deltas (↑X this week, vs avg N/day). Per-tile colour tinting. All data via live _read_group over indexed create_date — no snapshot table, no cron.

Phase 3 — Side-pane file preview + handler registry

Click a row (or kanban card) to preview without leaving the listing. Built-in handlers for image, PDF, audio, video; office-format fallback with download + Google Viewer affordance. Sibling modules (e.g. a future dms_onlyoffice) plug in via registry.category("dms.preview_handlers").add(...). Pane defaults visible, dismissable via "Hide preview" pill or Esc; selected row gets a primary-colour accent rail.

Phase 8 — Visual identity

  • Per-extension accent palette (PDF crimson, code teal, docs blue, etc.) applied to both backend kanban cards and the portal grid via a single shared SCSS token file.
  • Animated dropzone with marching dashed border + pulsing icon for upload feedback.
  • Hash-bucketed initials chip on directory kanban cards (8 stable palette buckets, no model field — computed at render time).
  • Condensed form heroes for directory + file (icon + title + tag chips + path + stats grid + 2-tab notebook replacing the upstream loose-fields layout).
  • Portal card grid mirroring the backend accents.

Phase 11 — Mockup gaps

  • Kanban directory subtitle + extension pill on every file card (catches filename collisions across directories).
  • Side-pane action toolbar: Download, Share (invokes existing dms.wizard_dms_file_share_action), Open form.
  • Search facet pill styling scoped to dms surfaces; uses Odoo 19's native search-bar facets — pure-SCSS overlay.

Phase 12 — Test coverage

9 → 61 test cases, ~85% file-level coverage on non-trivial JS source. Hoot tests for DmsStatBar, FilePreviewPane toolbar/load/dispatch, kanban + list renderer routing state, preview handlers (URL builders + dispatch), mount-view regressions, plus Python tests for get_dashboard_stats (sparkline shape + delta math) and _compute_path.

Architecture notes worth flagging

  • Preview-handler registry contract (dms/static/src/js/components/preview/preview_registry.esm.js) is the extension point for downstream modules. Each handler is {component, match, score}; the catch-all download handler runs at score -100 so any registered handler beats it.
  • Sparkline geometry is pure-JS in dms_stat_bar.esm.js (no chart library); renders inline SVG. Geometry validated by Hoot tests.
  • data-ext attribute is derived once at render time via t-set and reused for both the spine accent and the bottom-right ext pill — single source per card.
  • o_dms_form_hero SCSS lives in dms_form_hero.scss and applies to both directory + file forms (both arches declare class="o_dms_form").
  • Owl quirks pinned by tests: regex literals don't tokenize in QWeb expressions (dms/static/tests/views/file_kanban_mount.test.js); boolean attrs serialize as empty strings unless coerced to 'true'/'false'.

Preview & CI

  • Runboat: http://ledoent-dms-19-0-imp-dms-ux-<sha12>.runboat.hz.ledoweb.com
  • GitHub Actions (tests workflow) green on the latest commit; workflow_dispatch: added to the workflow so we can manually re-trigger if anti-abuse throttling silently drops a fork-PR push.

Out of scope (deferred to follow-ups)

  • Tree-style searchpanel (Phase 8f reverted — needs separate access-control reconciliation on the custom _search_panel_select_range override).
  • Per-directory avatar-stack + activity-bar on the landing cards (Phase B follow-up to the sparkline ship).
  • Hero mime-icon block for non-image files on the file form (current hero uses the image widget; image-files only get useful previews).
  • Status-tinted tag chips (needs a dms.tag.color semantic vocabulary that doesn't exist).
  • Tour conversion / portal HttpCase reorg (existing test_portal already runs via HttpCase + start_tour).

@dnplkndll dnplkndll changed the title [IMP] dms: kanban card density + toggle [IMP] dms: UX modernisation (kanban density + dashboard + side-pane preview + form heroes + portal grid + test coverage) May 22, 2026
…review + form heroes + portal grid + test coverage)

Comprehensive UX upgrade for OCA dms on 19.0, stacked on the in-flight MIG.
Fork-only PR for runboat preview + stakeholder review. See PR description for
the full breakdown; this is a single squash of 50 iteration commits.

Phases shipped:
  • Phase 1 — kanban density tiers (comfortable / compact / list) with toggle.
  • Phase 2 — directories landing dashboard: stat bar + live 30-day daily
    sparklines (line for files, bar for storage) + 24-hour line for "new today"
    + week-deltas. All data via _read_group over indexed create_date.
  • Phase 3 — side-pane file preview with extensible handler registry
    (dms.preview_handlers) + Download / Share / Open form toolbar. Built-in
    handlers for image, PDF, audio, video; office-format fallback with
    download + Google Viewer affordance.
  • Phase 8 — visual identity: per-extension accent palette (PDF crimson, code
    teal, docs blue, etc.) extracted to a shared SCSS partial used by both
    backend kanban and frontend portal; animated dropzone with marching dashed
    border; hash-bucketed initials chip on directory kanban cards; condensed
    form heroes for directory + file (icon + title + tag chips + path + stats
    grid + 2-tab notebook replacing the upstream loose-fields layout); portal
    card grid mirroring backend accents.
  • Phase 11 — late mockup gaps: kanban directory subtitle + extension pill;
    search facet pill styling scoped to dms surfaces.
  • Phase 12 — test coverage: 61 Hoot + Python test cases. Hoot suites for
    DmsStatBar, FilePreviewPane, kanban + list renderer routing, preview
    handler URL builders + dispatch; mount-view regression tests pinning the
    two browser-only Owl quirks (regex-literal tokenizer crash, boolean attr
    serialization). Python tests for get_dashboard_stats + _compute_path.
  • CI — workflow_dispatch added to tests workflow so we can manually trigger
    when GitHub's anti-abuse heuristic throttles fork PR runs.

Architecture notes:
  • Preview-handler registry (dms.preview_handlers) is the extension point for
    downstream modules; the always-last DownloadFallback at score=-100 means
    every mimetype gets some handler.
  • path_names compute uses direct field assignment (OCA idiom).
  • Sparkline geometry is pure inline-SVG in dms_stat_bar.esm.js; no chart
    library dependency. Geometry pinned by Hoot tests.
  • Owl quirks documented + pinned by mount-view tests: QWeb t-* expressions
    can't tokenize regex literals; t-att-boolean serializes as empty string
    unless coerced to "true"/"false".

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant