Add "Open folders" submenu and enhance recents menus#105
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds a new “Open folders” submenu to the tray icon context menu and refactors the “Recent captures/recordings” submenus to provide quicker actions (open/open folder/export GIF) plus “clear recents”, with accompanying unit tests.
Changes:
- Add “Open folders” submenu (Snips/Videos/Logs) and wire it to configured output directories.
- Redesign “Recent captures” / “Recent recordings” menus to use inline action buttons and add “Clear recent …” actions.
- Extend
TrayIconManagerTeststo cover the new folder-opening and empty-recents menu behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
Pointframe/Services/Infrastructure/TrayIconManager.cs |
Adds “Open folders” submenu; refactors recent menus to custom row UI + clear actions; introduces OpenConfiguredFolder. |
Pointframe.Tests/Services/TrayIconManagerTests.cs |
Adds tests for opening configured folders and for empty/non-empty recent menus; adds tests for clearing recents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }; | ||
| gifButton.MouseEnter += (s, _) => ((System.Windows.Controls.Button)s).Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(200, 230, 255)); | ||
| gifButton.MouseLeave += (s, _) => ((System.Windows.Controls.Button)s).Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(230, 240, 255)); | ||
| gifButton.Click += (_, _) => ExportRecentRecordingGif_Click(new WpfMenuItem { Tag = recentRecording }, new System.Windows.RoutedEventArgs()); |
| } | ||
|
|
||
| [Fact] | ||
| public void ClearRecentCaptures_Click_EmptiesCapturesAndRebuildsMen() |
Comment on lines
+630
to
+631
| Directory.CreateDirectory(path); | ||
| OpenFolder(path); |
Comment on lines
+298
to
+302
| var menuItem = new WpfMenuItem | ||
| { | ||
| Header = panel, | ||
| Tag = capturePath, | ||
| }; |
Comment on lines
+280
to
+284
| Content = "📁", | ||
| Width = 32, | ||
| Height = 28, | ||
| Padding = new System.Windows.Thickness(4), | ||
| ToolTip = "Open folder", |
Comment on lines
+382
to
+386
| Content = "🎬", | ||
| Width = 32, | ||
| Height = 28, | ||
| Padding = new System.Windows.Thickness(4), | ||
| ToolTip = "Export to GIF", |
Comment on lines
+378
to
+382
| public void ClearRecentCaptures_Click_EmptiesCapturesAndRebuildsMen() | ||
| { | ||
| StaTestHelper.Run(() => | ||
| { | ||
| var manager = CreateManager(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.