Skip to content

image preview: show size/zoom status bar when preview is visible#309366

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/image-zoom-status-bar-local-271120
Open

image preview: show size/zoom status bar when preview is visible#309366
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/image-zoom-status-bar-local-271120

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Problem

When viewing images locally (for example, in a side-by-side group or while another editor has focus), the image preview's size and zoom status bar entries were missing. They only appeared while the preview webview was focused.

Root cause

ImagePreview.updateState() and MediaPreview.updateState() gated show() of the status bar entries on webviewEditor.active (focused) rather than webviewEditor.visible (on screen). As soon as focus moved elsewhere, the entries were hidden.

Fix

Switch the show/hide gate for the size and zoom status bar entries to webviewEditor.visible. Keep the previewState transitions (Active vs Visible) tied to .active since that still reflects focus semantics used elsewhere.

Fixes #271120

Previously the size and zoom status bar entries were shown only when
the image preview editor was .active (focused). When the preview was
visible in another editor group or in the background it was never
.active, so the status bar stayed empty. Gate on .visible instead so
the entries appear whenever the preview tab is on screen, matching the
mental model users have from text editors.

previewState transitions continue to track .active (Active vs Visible).

Fixes microsoft#271120
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.

Missing Image Zoom Status Bar When Viewing Images Locally

2 participants