[ADD] dms_libreoffice_preview: server-side office→PDF preview handler#8
Closed
dnplkndll wants to merge 0 commit into
Closed
[ADD] dms_libreoffice_preview: server-side office→PDF preview handler#8dnplkndll wants to merge 0 commit into
dnplkndll wants to merge 0 commit into
Conversation
756c750 to
8f44070
Compare
f24c3d3 to
04f472c
Compare
8f44070 to
228d992
Compare
dnplkndll
added a commit
that referenced
this pull request
May 26, 2026
Live audit on the PR #8 runboat (2026-05-26) surfaced these defects: B1 — Sample.md rendered as raw text in the side pane. libmagic returns text/plain for .md (no magic signature distinguishes it from prose), so _effectiveMimetype() returned text/plain and TextPreview won over MarkdownPreview. Add text/plain to _STORED_OVERRIDABLE so the extension mapping wins for .md / .markdown / .json / .xml / .csv / etc. B2 / B3 / B4 — Files list view polish: - Add a leading mime-icon column (icon_url + image_url widget, 24×24) so list view matches kanban's scannability. - Replace the raw mimetype column ("application/vnd.oasis.ope…") with the short extension field; rename column header to "Type". - Set explicit widths on name (320), extension (90), human_size (100), write_date (180) so name no longer truncates ("Document…"). B5 — Form hero "TYPE" stat showed lowercase ("svg") while kanban cards use uppercase ("SVG"). Add &--uppercase modifier on .o_dms_form_hero __stat_value and apply it to the extension stat. B9 — Standardise the modified-date column label across list ("Modified") and form hero ("Modified"); upstream had "Last Updated on" in list. B10 — Hide the Subdirectories / Files table in the directory form when empty, reclaiming ~150px of blank rows on leaf directories. The hero-stat tiles still expose the "+ Add" affordance.
ffc5974 to
ff016d6
Compare
228d992 to
ae1f2d3
Compare
ff016d6 to
1f77ff5
Compare
ae1f2d3 to
6e174c5
Compare
1f77ff5 to
2029db5
Compare
6e174c5 to
19a9e23
Compare
2029db5 to
2b6fe4d
Compare
19a9e23 to
489b89a
Compare
2b6fe4d to
70dcc42
Compare
489b89a to
20e3f5f
Compare
70dcc42 to
f579209
Compare
20e3f5f to
2d149f3
Compare
f579209 to
08cec0b
Compare
2d149f3 to
d08be1c
Compare
08cec0b to
7246160
Compare
d08be1c to
6540867
Compare
7246160 to
ce97955
Compare
6540867 to
4f9a473
Compare
ce97955 to
fa54dfe
Compare
4f9a473 to
623f26e
Compare
fa54dfe to
134e055
Compare
623f26e to
0a76cf5
Compare
134e055 to
b1cd0fa
Compare
0a76cf5 to
1b13cc3
Compare
b1cd0fa to
9a2a20e
Compare
1b13cc3 to
9be740b
Compare
9a2a20e to
7c81428
Compare
9be740b to
bf4dec3
Compare
7c81428 to
349c9e3
Compare
bf4dec3 to
a6dd60b
Compare
349c9e3 to
fd2ec7f
Compare
a6dd60b to
58b2a8c
Compare
fd2ec7f to
189291b
Compare
58b2a8c to
937ed8e
Compare
189291b to
362a508
Compare
937ed8e to
62c0741
Compare
362a508 to
6d6b3c9
Compare
62c0741 to
89f37b4
Compare
6d6b3c9 to
d09e8ae
Compare
89f37b4 to
d09e8ae
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.
New sibling addon
dms_libreoffice_preview— server-side LibreOffice→PDF conversion that plugs into thedms.preview_handlersregistry introduced in #3. Fork-only; will be split as a standalone OCA submission once the basedms19.0.1.0.0 wheel ships.Base:
19.0-ci-ui-artifacts(#7) · Head:19.0-add-dms-libreoffice-preview.Stack: #3 UX → #9 Hoot → #7 CI → this PR.
What the branch adds
dms_libreoffice_preview/— new addon,depends: ["dms"],external_dependencies.deb: ["libreoffice", "fonts-noto", "fonts-liberation"](OCA CI installs at runtime).subprocess.run(["soffice", "--headless", "--convert-to", "pdf", ...])per-conversion temp dir to avoid.~lockcollisions.ir.attachmentondms.filekeyed bychecksum(auto-cascades on file delete; ACL inherits via parent'scheck_access)./dms/file/<id>/libreoffice_preview— notreadonly=True(writes the cached attachment), usesraise request.not_found() from efor ACL/missing.LibreofficePreviewregistered at score10(beats built-inOfficeFallbackPreviewat0); renders an<iframe>reusing the existing.o_dms_preview__iframeSCSS class.text/rtfincluded inOFFICE_MIMETYPESso libmagic'stext/rtfreply routes here instead ofTextPreview.checksumchange, malformed file, ACL denial. Hoot covers registry score + URL composition.Reviewer notes
unoserverdaemon mode is a future optimisation.dms.file.check_accessbefore serving the cached attachment.checksum(content-addressed), notwrite_date— surviveswrite_datebumps from unrelated field writes.CI
GitHub Actions on the
ledoentorg is currently throttled. Runboat builds + local--test-enablepass.