Skip to content

Use a media icon for the Images Preview editor label#320951

Merged
dmitrivMS merged 8 commits into
microsoft:mainfrom
arun-357:fix/image-carousel-editorIcon
Jun 12, 2026
Merged

Use a media icon for the Images Preview editor label#320951
dmitrivMS merged 8 commits into
microsoft:mainfrom
arun-357:fix/image-carousel-editorIcon

Conversation

@arun-357

Copy link
Copy Markdown
Contributor

Fixes #304121

Problem

The Images Preview editor shows the default text-file icon in its modal header label, which doesn't represent image content:
editorIcon1

Fix

ImageCarouselEditorInput never overrode getIcon(), so the label fell back to the default file icon. This change registers a dedicated icon and returns it from the input, following the same pattern used by other editor inputs (searchEditorInput.ts, chatDebugEditorInput.ts, extensionsInput.ts, etc.):

const imageCarouselEditorIcon = registerIcon('image-carousel-editor-label-icon', Codicon.fileMedia, localize('imageCarouselEditorLabelIcon', 'Icon of the images preview editor label.'));

// in ImageCarouselEditorInput
override getIcon(): ThemeIcon {
	return imageCarouselEditorIcon;
}

Notes:

  • $(file-media) is proposed as the icon — happy to switch to a different codicon if preferred.
  • Registering through registerIcon keeps the icon overridable by product icon themes, consistent with the other editor label icons.
  • No rendering changes needed: the modal header (modalEditorPart.ts) already renders getIcon() via the resource label, and the icon is sized by the shared .monaco-icon-label styles like every other editor icon.

Before / After

Before:
editorIcon1

After:
editorIcon2
editor3

Copilot AI review requested due to automatic review settings June 11, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a themed icon for the Image Carousel editor input so the editor label can display a consistent icon.

Changes:

  • Registers a new theme icon for the image carousel editor label.
  • Overrides getIcon() on ImageCarouselEditorInput to return the registered icon.

Comment thread src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.ts Outdated
Comment thread src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.ts Outdated
@arun-357 arun-357 changed the title fix: default text-file icon shown for Images Preview editor Use a media icon for the Images Preview editor label Jun 11, 2026
dmitrivMS
dmitrivMS previously approved these changes Jun 11, 2026
@dmitrivMS dmitrivMS enabled auto-merge (squash) June 11, 2026 17:19
mjbvz
mjbvz previously approved these changes Jun 11, 2026
auto-merge was automatically disabled June 12, 2026 14:30

Head branch was pushed to by a user without write access

@arun-357 arun-357 dismissed stale reviews from mjbvz and dmitrivMS via 6d07a7c June 12, 2026 14:30
@arun-357

Copy link
Copy Markdown
Contributor Author

@dmitrivMS Apologies — I merged main locally and pushed while debugging the flaky testcase which was failing once for macos and twice windows for chat session. Could you re-approve when you get a chance? (the diff is unchanged)

@dmitrivMS dmitrivMS enabled auto-merge (squash) June 12, 2026 20:05
@dmitrivMS dmitrivMS merged commit cb085e3 into microsoft:main Jun 12, 2026
39 of 40 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 12, 2026
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.

Images preview could use a nicer icon

6 participants