Skip to content

Improve usability of image file picker#17018

Open
sgraband wants to merge 1 commit intomasterfrom
sg/gh-16707
Open

Improve usability of image file picker#17018
sgraband wants to merge 1 commit intomasterfrom
sg/gh-16707

Conversation

@sgraband
Copy link
Contributor

What it does

Remove header to align with other quick-picks.
Render a placeholder that provides information.
Show opened image files as options.
Always show clipboard option as the last option.

Fixes #16707

How to test

Click the + in the chat and select image file.
Search for files and ensure that open files are shown right away.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

Remove header to align with other quick-picks.
Render a placeholder that provides information.
Show opened image files as options.
Always show clipboard option as the last option.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
@sgraband sgraband requested a review from ndoschek February 18, 2026 10:04
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Feb 18, 2026
@sgraband
Copy link
Contributor Author

@ndoschek What would you think about showing the 10 first found files, if no images are currently open? This would make it more explicit to the user that he can also search for files without reading the placeholder.
We might then also adjust this for the file picker to stay consistent.

Copy link
Member

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

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

Hi @sgraband, thanks, this is a nice improvement!

The removal of the header, the placeholder text, and showing opened image files all look good.

A few suggestions:

  • Instead of only showing currently opened image files, I'd suggest showing "recently opened" files filtered by images. This is the pattern we use elsewhere in Theia's quick input selecting files and would automatically include currently opened files as well. It should also show the blue "recently opened" label as we have for the file picker I'd suggest. This would then not need a new concept like searching and showing N images.
  • Consider adding QuickPickSeparators to visually separate the sections - e.g. between "recently opened" images and the clipboard entry.

This also partially addresses #15946. Could you link that issue as well, so the remaining items are easier to track?

const mainWidgets = this.shell.getWidgets('main');

// Use NavigatableWidget.get() helper to find widgets with URIs
for (const [uri] of NavigatableWidget.get(mainWidgets)) {
Copy link
Member

Choose a reason for hiding this comment

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

Could be simplified by using the filter parameter of NavigatableWidget.get() instead of filtering manually afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

AI Chat: Image context shows an empty selection and can't add or select an image file

2 participants

Comments