Skip to content

Feature: Add Open With toolbar flyout#18581

Open
0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:fix-17291
Open

Feature: Add Open With toolbar flyout#18581
0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:fix-17291

Conversation

@0x5bfa

@0x5bfa 0x5bfa commented Jun 12, 2026

Copy link
Copy Markdown
Member

Resolved / Related Issues

Steps used to test these changes

  1. Open Files app
  2. Select a file
  3. Click the "Open With" flyout
image

Copilot AI review requested due to automatic review settings June 12, 2026 07:19

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 an “Open with” toolbar group that dynamically builds a flyout from the Windows shell Open With context menu for the currently selected file.

Changes:

  • Introduces OpenWithMenu (Win32/COM wrapper) to build/enumerate the shell “Open with” menu and invoke selections.
  • Updates the toolbar to populate an “Open with” flyout asynchronously and adds the group to the default toolbar layout.
  • Extends CsWin32 inputs/guids to support IDataObject and Open With shell COM usage, plus small config/docs updates.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Files.App/Utils/Shell/OpenWithMenu.cs New Win32/COM wrapper to construct and invoke the shell “Open with” menu.
src/Files.App/UserControls/Toolbar.xaml.cs Adds async flyout population and binds menu items to OpenWithMenu.InvokeItem.
src/Files.App/Properties/launchSettings.json Renames the launch profile.
src/Files.App/Data/Items/ToolbarSections.cs Adds the “OpenWith” group to default toolbar sections.
src/Files.App/Data/Commands/Manager/CommandGroupManager.cs Defines OpenWithCommandGroup metadata for the toolbar.
src/Files.App.CsWin32/NativeMethods.txt Adds IDataObject to CsWin32 generation inputs.
src/Files.App.CsWin32/ManualGuid.cs Adds GUIDs for IID_IDataObject, CLSID_OpenWithMenu, and BHID_DataObject.
CLAUDE.md Adds a pointer file to agent guidelines.
AGENTS.md Updates repository development guidelines.
Comments suppressed due to low confidence (1)

CLAUDE.md:1

  • As written, CLAUDE.md contains only a bare filename, which isn’t very discoverable for humans/tools that expect markdown guidance. Consider making this an explicit reference (e.g., a short sentence or markdown link) so it’s clear the intent is to redirect to AGENTS.md.
# Files Development Guidelines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Files.App/Utils/Shell/OpenWithMenu.cs
Comment thread src/Files.App/UserControls/Toolbar.xaml.cs
Comment thread src/Files.App/UserControls/Toolbar.xaml.cs Outdated
Comment thread src/Files.App/Utils/Shell/OpenWithMenu.cs Outdated
Comment thread src/Files.App/Data/Items/ToolbarSections.cs Outdated
Comment thread src/Files.App/Properties/launchSettings.json
@yair100 yair100 added the ready for review Pull requests that are ready for review label Jun 12, 2026
Comment thread src/Files.App/Data/Items/ToolbarSections.cs
@yair100

yair100 commented Jun 14, 2026

Copy link
Copy Markdown
Member

@0x5bfa I tested the flyout and it works quite well. One issue I noticed is that for files with no supported applications, clicking 'Open with' displays an empty flyout. Are we able to disable the toolbar button for these files?

@Josh65-2201

Josh65-2201 commented Jun 17, 2026

Copy link
Copy Markdown
Member

'Open with' displays an empty flyout. Are we able to disable the toolbar button for these files?

Instead of disabling the button the drop down could be instead and then it opens the select prompt like it does in 4.1.3. That would also match how the context menu works

@yair100

yair100 commented Jun 17, 2026

Copy link
Copy Markdown
Member

@Josh65-2201 this PR introduces a new action group 'Open with...' that users can pin to the toolbar, it doesn't change the behavior of the existing 'Open with' action.

@Josh65-2201

Josh65-2201 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Seem odd to have two, Is it not possible to have them combined or keep the chose another app option.

@yair100

yair100 commented Jun 17, 2026

Copy link
Copy Markdown
Member

or keep the chose another app option.

Displaying 'Choose another app' when no options are available sounds like a good solution.

@0x5bfa

0x5bfa commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

Done.

image

@yair100

yair100 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Looks good. One more thing to consider is the behavior when multiple files are selected. Since the 'Choose another app' picker only supports a single file, we should disable when multiple files are selected.

@mdtauk

mdtauk commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Looks good. One more thing to consider is the behavior when multiple files are selected. Since the 'Choose another app' picker only supports a single file, we should disable when multiple files are selected.

What if all the selected files are of the same or compatible types? Like a group of JPG and PNG images, all being openable in Photoshop or some other multi-document graphics package?

@yair100

yair100 commented Jun 18, 2026

Copy link
Copy Markdown
Member

What if all the selected files are of the same or compatible types? Like a group of JPG and PNG images, all being openable in Photoshop or some other multi-document graphics package?

The open file picker only supports a single file. It doesn't make a difference if all of the items are the same type.

@0x5bfa

0x5bfa commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

The context menu in the Explorer just hides that menu item. May want to disable this drop down.

@yair100 yair100 added changes requested Changes are needed for this pull request and removed ready for review Pull requests that are ready for review labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes are needed for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: "Open with" toolbar dropdown

5 participants