Update sort menu#69
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Actions as ActionsMenu (Main.qml)
participant Sub as sortSubMenu
participant Ctrl as Controller
participant UI as UIState
User->>Actions: hover / click "Sort Photos"
Actions->>Sub: open()
User->>Sub: click "By Filename"
Sub->>Ctrl: set_sort_mode("filename")
Ctrl-->>UI: update sortMode
Sub->>Actions: close()
Actions-->>User: menu closed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57bb2f4fa8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onHoveredChanged: { | ||
| if (hovered) { | ||
| sortSubMenu.popup(sortPhotosLauncher, sortPhotosLauncher.width - 4, 0) | ||
| } |
There was a problem hiding this comment.
Support click to open sort submenu
The new sortPhotosLauncher only opens sortSubMenu from onHoveredChanged, so users on non-hover inputs (touchscreens, pen-only devices, and keyboard activation) cannot reach any sort mode at all. Since this commit also removed the direct sort actions from the main menu, sorting becomes inaccessible in those environments; adding an onClicked (or equivalent focus/keyboard trigger) is needed to preserve functionality.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
faststack/qml/Main.qml (1)
1037-1054:⚠️ Potential issue | 🟡 MinorKeep the disabled
Stack Source RAWsaction visibly disabled.This delegate is now conditionally disabled, but the custom text/background styling still renders it like an active action. When
uiState.isStackedJpgis false, it looks clickable even though it will not run.Possible fix
ItemDelegate { width: 220 height: 36 text: "Stack Source RAWs" enabled: uiState ? uiState.isStackedJpg : false onClicked: { if (uiState) uiState.stack_source_raws(); actionsMenu.close() } background: Rectangle { - color: parent.hovered ? (root.isDarkTheme ? "#555555" : "#e0e0e0") : "transparent" + color: parent.enabled && parent.hovered + ? (root.isDarkTheme ? "#555555" : "#e0e0e0") + : "transparent" } contentItem: Text { text: parent.text - color: root.currentTextColor + color: parent.enabled + ? root.currentTextColor + : (root.isDarkTheme ? "#666666" : "#999999") verticalAlignment: Text.AlignVCenter leftPadding: 10 } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@faststack/qml/Main.qml` around lines 1037 - 1054, The ItemDelegate's visual styling doesn't reflect its disabled state (enabled: uiState ? uiState.isStackedJpg : false), so update the background and contentItem styling to react to parent.enabled (or control.enabled) instead of only parent.hovered/root.isDarkTheme: ensure hover color is suppressed when disabled, change Text color or opacity when disabled, and use a disabledBackground/disabledText color (or reduced opacity) so "Stack Source RAWs" clearly appears inactive; keep the existing onClicked guard as-is (uiState.stack_source_raws()).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@faststack/qml/Main.qml`:
- Around line 911-944: The sort submenu is only opened on hover and lives as an
independent overlay, leaving keyboard/touch users unable to open it and allowing
it to outlive the parent menu; change sortPhotosLauncher to open sortSubMenu on
activation (keyboard/press) instead of only onHoveredChanged by handling
onClicked/onPressed or onTriggered and Keys.enter/space, call
sortSubMenu.popup(actionsMenu, sortPhotosLauncher.width - 4, 0) or otherwise set
sortSubMenu's parent/parentMenu to actionsMenu so its lifecycle is tied to the
parent, and add an actionsMenu.onClosed handler to explicitly close sortSubMenu
(or bind sortSubMenu.visible) so the submenu is dismissed when the parent menu
closes; use the existing ids sortPhotosLauncher, sortSubMenu, and actionsMenu to
locate and update the code.
---
Outside diff comments:
In `@faststack/qml/Main.qml`:
- Around line 1037-1054: The ItemDelegate's visual styling doesn't reflect its
disabled state (enabled: uiState ? uiState.isStackedJpg : false), so update the
background and contentItem styling to react to parent.enabled (or
control.enabled) instead of only parent.hovered/root.isDarkTheme: ensure hover
color is suppressed when disabled, change Text color or opacity when disabled,
and use a disabledBackground/disabledText color (or reduced opacity) so "Stack
Source RAWs" clearly appears inactive; keep the existing onClicked guard as-is
(uiState.stack_source_raws()).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e356d2b-72d1-45a8-b209-2d44759f1a92
📒 Files selected for processing (5)
.gitignorefaststack/app.pyfaststack/qml/Main.qmllightroom-catalog-import/inspect_lrcat_photo.pylightroom-catalog-import/lrcat_diff.py
Summary by CodeRabbit
New Features
Refactor