Repository navigation
fix: make info panel thumbnail/histogram independent toggles (#538) - #598
Merged
Merged
Conversation
…#538) - thumbnail and histogram buttons are now independent toggles; both can be shown simultaneously - turning off the last visible panel collapses the preview section like the other info sections; re-opening restores the last unchecked panel - config: previewMode ('thumbnail' | 'histogram') replaced by showThumbnail + showHistogram, with a deserialize migration for the persisted radio choice (plus transient previewRestore) - tests: filePreviewToggle.test.mjs (7) covering toggle independence, video guard, collapse/restore, migration, and template structure
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
Fixes #538. The thumbnail and histogram buttons in the File Info preview section behaved like a radio pair — only one could be shown at a time. They are now independent toggles, so both panels can be viewed simultaneously.
Behavior
Screenshot
Changes
src-vite/src/components/FileInfo.vue— buttons now calltogglePreviewPanel('thumbnail' | 'histogram')and reflectshowThumbnailPanel/showHistogramPanelindependently (no morerole="tablist"— they are no longer mutually exclusive); preview section renders the thumbnail and/or histogram panels stacked (mt-3spacing when both visible);togglePreviewPanelcollapsesshowPreviewwhen no panel remains and recordspreviewRestore;togglePreviewrestores thatpanel on re-open; navigator-visibility and video-preview triggers now key off the thumbnail panel instead of "not histogram".
src-vite/src/stores/configStore.js— replacedinfoPanel.previewMode('thumbnail' | 'histogram') withshowThumbnail+showHistogram(+ transientpreviewRestore);persist.serializer.deserializemigrates the old persisted radio choice so existing users keep their previous state.src-vite/package.json— addedtest:preview-togglescript.src-vite/tests/filePreviewToggle.test.mjs— new regression tests (7) covering toggle independence, video guard, collapse/restore, config migration, and template structure.Verification
pnpm build✅pnpm test:preview-toggle— 7/7 passstartupfailure also present on cleanmain— unrelated)cargo tauri dev→ File Info → Preview → both buttons can be active together; unchecking both collapses the section and re-opening restores the last unchecked panelFixes #538