[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
Open
Conversation
…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>
875ee18 to
123ee79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comprehensive UX modernisation of OCA
dmsfor 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_urlfield.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_groupover indexedcreate_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 viaregistry.category("dms.preview_handlers").add(...). Pane defaults visible, dismissable via "Hide preview" pill orEsc; selected row gets a primary-colour accent rail.Phase 8 — Visual identity
Phase 11 — Mockup gaps
dms.wizard_dms_file_share_action), Open form.Phase 12 — Test coverage
9 → 61 test cases, ~85% file-level coverage on non-trivial JS source. Hoot tests for
DmsStatBar,FilePreviewPanetoolbar/load/dispatch, kanban + list renderer routing state, preview handlers (URL builders + dispatch), mount-view regressions, plus Python tests forget_dashboard_stats(sparkline shape + delta math) and_compute_path.Architecture notes worth flagging
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-100so any registered handler beats it.dms_stat_bar.esm.js(no chart library); renders inline SVG. Geometry validated by Hoot tests.data-extattribute is derived once at render time viat-setand reused for both the spine accent and the bottom-right ext pill — single source per card.o_dms_form_heroSCSS lives indms_form_hero.scssand applies to both directory + file forms (both arches declareclass="o_dms_form").dms/static/tests/views/file_kanban_mount.test.js); boolean attrs serialize as empty strings unless coerced to'true'/'false'.Preview & CI
http://ledoent-dms-19-0-imp-dms-ux-<sha12>.runboat.hz.ledoweb.comtestsworkflow) 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)
_search_panel_select_rangeoverride).dms.tag.colorsemantic vocabulary that doesn't exist).