Skip to content

Refine archive preview and PDF defaults - #738

Merged
klboke merged 2 commits into
masterfrom
paseo/kkfileview
Apr 13, 2026
Merged

Refine archive preview and PDF defaults#738
klboke merged 2 commits into
masterfrom
paseo/kkfileview

Conversation

@klboke

@klboke klboke commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • redesign the archive preview page into a single-card workspace with a collapsible tree and inline preview
  • default Office previews to PDF, open the PDF thumbnail sidebar by default, and hide the JPG/PDF mode switch by default
  • polish single-image preview styling and fix archive extraction so repeated decompression no longer corrupts Office files inside zip archives

Testing

  • mvn -q -pl server -Dtest=PdfViewerCompatibilityTests test
  • manually verified zip directory preview, inline file preview, and single-image preview UI in dev mode
  • manually reproduced and fixed the zip-contained pptx case that previously stayed on 预览加载中...

Copilot AI review requested due to automatic review settings April 13, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines archive preview UX and adjusts PDF/Office preview defaults, while addressing archive extraction behavior that could corrupt repeated decompression outputs.

Changes:

  • Redesignes the archive (compress) preview page into a single workspace with a collapsible tree and inline iframe preview.
  • Defaults Office previews to PDF and opens the PDF viewer with the thumbnail sidebar visible by default.
  • Fixes RAR extraction to overwrite files deterministically instead of appending across extraction chunks.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/src/main/resources/web/compress.ftl Major UI/JS rewrite for archive directory + inline preview workspace.
server/src/main/resources/web/pdf.ftl Adds PDF.js hash params to open thumbnails by default.
server/src/main/config/application.properties Changes Office preview defaults to PDF and disables the mode switch by default.
server/src/main/resources/web/picture.ftl Tweaks image preview styling (background + focus outline behavior).
server/src/main/java/cn/keking/service/CompressFileReader.java Adjusts RAR extraction to avoid file corruption on repeated decompression.
server/src/test/java/cn/keking/PdfViewerCompatibilityTests.java Adds regression tests for PDF thumbnail sidebar default + Office preview default.
server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java Formatting-only change.
.gitignore Ignores .artifacts/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/main/resources/web/compress.ftl
Comment thread server/src/main/resources/web/picture.ftl
Comment thread server/src/test/java/cn/keking/PdfViewerCompatibilityTests.java Outdated
@klboke
klboke merged commit 597715c into master Apr 13, 2026
2 checks passed
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.

2 participants