-
-
Notifications
You must be signed in to change notification settings - Fork 378
Improve Quick Access Link Adding UI #3739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated "Name" and "Path" keys and added new keys in en.xaml. - Modified QuickAccessLinkSettings.xaml: increased Window height and improved layout using Grid structure. - Added new UI elements: implemented radio buttons for file/folder selection. - Added and initialized QuickAccessLinks property in QuickAccessLinkSettings.xaml.cs. - Added file selection dialog in SelectPath_OnClick method. - Added IsFileSelected and IsFolderSelected properties to implement selection functionality.
This comment has been minimized.
This comment has been minimized.
🥷 Code experts: Jack251970 Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Warning Rate limit exceeded@Jack251970 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 42 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe Explorer plugin's Quick Access Link feature was updated to allow users to select either files or folders as shortcuts. UI elements and localization resources were adjusted to support this, including new radio buttons for type selection and updated resource strings. The selection dialog now adapts based on the chosen type. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant QuickAccessLinkSettings (UI)
participant QuickAccessLinkSettings.xaml.cs (Logic)
participant FileDialog
participant FolderDialog
User->>QuickAccessLinkSettings (UI): Open Quick Access Link Settings
QuickAccessLinkSettings (UI)->>User: Show "File" and "Folder" radio buttons
User->>QuickAccessLinkSettings (UI): Select "File" or "Folder"
User->>QuickAccessLinkSettings (UI): Click "Select" for Path
QuickAccessLinkSettings (UI)->>QuickAccessLinkSettings.xaml.cs: Trigger SelectPath_OnClick
alt IsFileSelected
QuickAccessLinkSettings.xaml.cs->>FileDialog: Open file selection dialog
FileDialog-->>QuickAccessLinkSettings.xaml.cs: Return selected file path
else IsFolderSelected
QuickAccessLinkSettings.xaml.cs->>FolderDialog: Open folder selection dialog
FolderDialog-->>QuickAccessLinkSettings.xaml.cs: Return selected folder path
end
QuickAccessLinkSettings.xaml.cs->>QuickAccessLinkSettings (UI): Update Path field
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs (2)
118-126
:Type
property is not persisted for new linksWhen adding a new
AccessLink
, you omit theType
:var newAccessLink = new AccessLink { Name = SelectedName, Path = SelectedPath };Down-stream consumers will treat the link as “Unknown”.
Inject the selected type:+ Type = IsFileSelected + ? AccessLink.LinkType.File + : AccessLink.LinkType.Folder,
99-113
: Editing scenario ignores updated typeIn edit mode you keep
SelectedAccessLink.Type
, even if the user toggles File/Folder.
Assign the freshly chosen type as shown above.
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml (1)
68-79
: Minor: redundant stacked panels & empty rowsThe outer
<StackPanel>
+ inner<StackPanel>
+<Grid>
triple-nest adds unnecessary visual tree depth.
Consider removing the middle anonymousStackPanel
and set the margin on theGrid
directly – simpler and cheaper.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml
(3 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (3)
Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml (1)
101-105
: Duplicate-key/ backward-compatibility checkYou replaced the old
plugin_explorer_name
,plugin_explorer_path
values and re-added them here without the trailing colon.
Please confirm that:
- The old “Name:” / “Path:” entries were removed from every language file.
- No other key with the same name still exists earlier in this resource dictionary (duplicate keys crash the XAML parser on load).
If both conditions aren’t met the app will throw at startup.
Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml (1)
104-118
: RadioButton bindings are one-way – selection never reaches code-behind
IsChecked="{Binding IsFileSelected}"
/IsFolderSelected
default to OneWay, meaning user clicks do not update the booleans used inSelectPath_OnClick
.
Result:IsFileSelected
remainsfalse
; the file dialog is never shown.-IsChecked="{Binding IsFileSelected}" +IsChecked="{Binding IsFileSelected, Mode=TwoWay}" ... -IsChecked="{Binding IsFolderSelected}" +IsChecked="{Binding IsFolderSelected, Mode=TwoWay}"Without TwoWay binding the new feature is effectively broken.
Likely an incorrect or invalid review comment.
Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs (1)
131-157
: Dialog branching relies on booleans that never changeBecause of the one-way binding noted in XAML,
IsFileSelected
/IsFolderSelected
never reflect user input, so this block always falls into the folder branch.
Once the binding is fixed, also mark the properties withOnPropertyChanged()
when altered to refresh the UI if needed.Additionally, add a
DefaultExt
/Filter
toOpenFileDialog
to improve UX.
Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml.cs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Quick Access Link dialog by adding a Type selector (File/Folder) and updating the UI layout and design, while also migrating view classes to use the CommunityToolkit.Mvvm source generators.
- Added a Type radio group and dynamic Browse behavior in QuickAccessLinkSettings.
- Converted several Views to
[INotifyPropertyChanged]
and removed manualINotifyPropertyChanged
implementations. - Updated XAML layouts, labels, sizes, and window dimensions; added new localization keys.
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 |
---|---|
QuickAccessLinkSettings.xaml.cs | Added ResultType logic, refactored dialog branches, removed manual change events |
QuickAccessLinkSettings.xaml | Switched to a Grid layout and added Type radio buttons |
PreviewPanel.xaml.cs | Removed manual INotifyPropertyChanged , decorated with [INotifyPropertyChanged] |
ExplorerSettings.xaml | Cleaned up unused xmlns |
ActionKeywordSetting.xaml.cs | Replaced manual PC events with [INotifyPropertyChanged] and SetProperty |
ActionKeywordModel.cs | Moved to ViewModels namespace, inherits BaseModel |
en.xaml | Added localization for "Type", "File", and "Folder" |
SettingsControl.xaml.cs | Added [INotifyPropertyChanged] , removed manual events |
Flow.Launcher.Plugin.BrowserBookmark.csproj | Added CommunityToolkit.Mvvm package reference |
What's the PR
Added a Type field to the Quick Access Add window in the Explorer plugin and adjusted the corresponding dialog behavior accordingly.
Updated window buttons, labels, sizes, and overall design.
This continues from the changes introduced in Support select file & folder in quick link access add button #3738.
Details:
Currently, when adding a new Quick Access entry in the Explorer plugin, only a folder selection dialog is shown.
However, since Quick Access already supports files and drive volumes, it would be better if users could select files or other locations as well when clicking "Browse."
The standard dialog requires using separate dialogs for selecting files or folders.
Therefore, I added a Type radio selection. Depending on the selected type, the appropriate dialog will be shown when clicking the "Browse" button.
The Type selection only affects the behavior of the Browse button.
Default selection is set to File.
Test Case: