Refine archive preview and PDF defaults - #738
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
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.
Summary
Testing
mvn -q -pl server -Dtest=PdfViewerCompatibilityTests testpptxcase that previously stayed on预览加载中...