Feat/file browser rich preview#16
Merged
Merged
Conversation
…er handling Refactored the Git graph implementation to replace the swim-lane layout with a native `git log --graph` representation. Updated the data structures to use `GitGraphEntry` for better clarity and streamlined the fetching of commit data. Improved gutter handling for better alignment and visual consistency in the sidebar. This change enhances the overall user experience by providing a more accurate representation of commit relationships.
Added support for previewing various file types including images, videos, Markdown, and Mermaid diagrams. Introduced a new `FilePreviewHeader` component to display file metadata such as name, path, size, and modification time. Enhanced the Markdown renderer to support inline Mermaid blocks and improved the overall user experience with loading states and error handling. Updated internationalization keys for new features across multiple languages.
… error handling and internationalization Completed the implementation of the file preview feature, supporting images, videos, Markdown, and Mermaid diagrams. Introduced a structured error handling system using `FilePreviewError` to provide user-friendly messages for various failure scenarios. Updated internationalization keys across multiple languages to reflect new error messages and improved user experience. Marked the file browser rich preview as active in the plans documentation.
…ers and documentation Expanded the file preview feature to support rich previews for images, videos, Markdown, and Mermaid diagrams. Introduced a new topbar displaying file metadata and improved error handling for unsupported file types. Updated documentation to include a dedicated section for file previews and added screenshots for better user guidance. Included internationalization updates for new keys across all supported languages.
…ew with line numbers and syntax highlighting Added a new `CodeView` component to the file preview feature, enabling a two-column layout for source code files with line numbers and syntax highlighting using highlight.js. This update allows users to select specific lines for reference, improving the usability of code previews. The implementation includes support for various programming languages and integrates with existing file preview functionalities. Updated styles and documentation to reflect these changes, along with new unit tests for the CodeView component.
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
Extends the center-tab file preview introduced on
main(images, video, Markdown, Mermaid) into a full typed preview system with sandboxed Tauri IPC, dedicated renderers, and a shared topbar.ImageView,VideoView,MarkdownView(pulldown-cmark + sanitized HTML), andMermaidView(vendored Mermaid 11.x, lazy-loaded) with extension-based routing viaFileKindand new commandsstat_workspace_file,read_workspace_image_file,read_workspace_video_fileinsrc-tauri/src/fs_entries.rs(16 MiB image / 64 MiB video caps, workspace-root sandbox unchanged).CodeViewwith sticky line-number gutter, highlight.js syntax highlighting forFileKind::Code, plain monospaced layout forFileKind::Text, and per-row click selection;hljs_glue.rs+util.rssplit highlighted HTML into balanced per-line fragments.FilePreview*keys across all 13 locales;docs/user/file-preview.mdand architecture/IPC docs updated.git_graphgutter/layout refactor (1f309ab) bundled on this branch.44 files changed (~7.9k insertions). Vendored assets:
public/vendor/highlight/,public/vendor/mermaid/.Test plan
.md(incl. fenced mermaid),.mmd, unsupported binary → correct renderer or placeholder.rs,.ts): line numbers, syntax colors, row select/deselect; plain.txt/.logwithout highlightingcargo test --workspaceandcargo check -p blxcode-ui --target wasm32-unknown-unknownMade with Cursor