Skip to content

Code Quality: Created Action groups#18270

Merged
yair100 merged 4 commits intomainfrom
ya/ActionGroups
Mar 17, 2026
Merged

Code Quality: Created Action groups#18270
yair100 merged 4 commits intomainfrom
ya/ActionGroups

Conversation

@yair100
Copy link
Member

@yair100 yair100 commented Mar 16, 2026

Resolved / Related Issues

  • Added support for grouping actions. This will allow us to create flyouts without manually adding each item to the flyout. It will allow us to reduce code in the Context Menu, Toolbar, and possibly add some new features in the future.
  • Created a few basic groups to start the process (New, Set as Background, & Extract).
  • The AccessKey property can now be defined from the RichCommand class.

More work is needed to apply these changes, but I don't want to complicate this PR.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Confirmed the modified toolbar behaves the same as main.

@yair100 yair100 marked this pull request as draft March 16, 2026 20:05
@yair100 yair100 force-pushed the ya/ActionGroups branch 4 times, most recently from 3c4632e to ffffe07 Compare March 16, 2026 21:10
@yair100 yair100 marked this pull request as ready for review March 16, 2026 22:05
@yair100 yair100 added the ready for review Pull requests that are ready for review label Mar 16, 2026
@yair100 yair100 requested a review from 0x5bfa March 16, 2026 22:06
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

Overall looks good to me. Bad that there's no ItemsSource in MenuFlyout for us to bind properties.

using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace Files.App.Actions;
Copy link
Member

Choose a reason for hiding this comment

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

Better to put this (preferably separating each class) in https://github.com/files-community/Files/tree/main/src/Files.App/Data/Commands/Manager


namespace Files.App.Actions;

public sealed class CommandGroups
Copy link
Member

Choose a reason for hiding this comment

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

Preferably CommandGroupManager with namespace Files.App.Data.Commands

@yair100
Copy link
Member Author

yair100 commented Mar 17, 2026

Overall looks good to me. Bad that there's no ItemsSource in MenuFlyout for us to bind properties.

It would be nice, agreed.

@yair100 yair100 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Mar 17, 2026
@yair100 yair100 merged commit 5c72304 into main Mar 17, 2026
9 checks passed
@yair100 yair100 deleted the ya/ActionGroups branch March 17, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants