Skip to content

Update sort menu#69

Merged
AlanRockefeller merged 3 commits intomainfrom
test
Apr 11, 2026
Merged

Update sort menu#69
AlanRockefeller merged 3 commits intomainfrom
test

Conversation

@AlanRockefeller
Copy link
Copy Markdown
Owner

@AlanRockefeller AlanRockefeller commented Apr 11, 2026

Summary by CodeRabbit

  • New Features

    • Added "Sort Photos" submenu with sort options (Default, By Filename, By Date)
    • New direct actions in the main menu: Clear Filename Filter, Add Favorites to Batch, Add Uploaded to Batch, Jump to Last Uploaded, Auto-Level Batch, Stack Source RAWs
    • Improved view toggle now shows "Single Image View" / "Thumbnail View" dynamically
  • Refactor

    • Minor UI and code formatting cleanup for more consistent behavior and styling

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a47044b-25ae-4f80-9c75-ea69a2b41dc3

📥 Commits

Reviewing files that changed from the base of the PR and between 57bb2f4 and 1e74bd8.

📒 Files selected for processing (1)
  • faststack/qml/Main.qml
🚧 Files skipped from review as they are similar to previous changes (1)
  • faststack/qml/Main.qml

Walkthrough

Adds OpenFocus/ to .gitignore, minor tuple-unpacking cleanup in faststack/app.py, refactors Main.qml menu to add a "Sort Photos" launcher with submenu and several batch actions, and normalizes SQL string formatting in two lightroom-catalog-import modules.

Changes

Cohort / File(s) Summary
Version Control Configuration
.gitignore
Added OpenFocus/ to ignore list.
App Logic
faststack/app.py
Whitespace cleanup and simplified tuple-unpacking in AppController.undo_delete() for the "delete" case (no behavioral change).
QML UI Restructuring
faststack/qml/Main.qml
Replaced inline sort items with a Sort Photos launcher + sortSubMenu; added batch actions (Clear Filename Filter, Add Favorites to Batch, Add Uploaded to Batch, Jump to Last Uploaded, Auto-Level Batch, Stack Source RAWs); adjusted enable/hover styling and grid/loupe toggle behavior; wired controller calls (controller.set_sort_mode(...)) and uiState actions.
SQL Formatting
lightroom-catalog-import/inspect_lrcat_photo.py, lightroom-catalog-import/lrcat_diff.py
Reformatted SQL string literal formatting in get_tables() calls without changing query semantics or results.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Update sort menu' directly corresponds to the main change: restructuring the sort UI from top-level menu items to a new 'Sort Photos' launcher with a submenu.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread faststack/qml/Main.qml
Comment on lines +939 to +942
onHoveredChanged: {
if (hovered) {
sortSubMenu.popup(sortPhotosLauncher, sortPhotosLauncher.width - 4, 0)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

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 | 🟡 Minor

Keep the disabled Stack Source RAWs action visibly disabled.

This delegate is now conditionally disabled, but the custom text/background styling still renders it like an active action. When uiState.isStackedJpg is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8e75d05 and 57bb2f4.

📒 Files selected for processing (5)
  • .gitignore
  • faststack/app.py
  • faststack/qml/Main.qml
  • lightroom-catalog-import/inspect_lrcat_photo.py
  • lightroom-catalog-import/lrcat_diff.py

Comment thread faststack/qml/Main.qml
@AlanRockefeller AlanRockefeller merged commit f2fdeb1 into main Apr 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant