transform notation actions to commands#34138
Conversation
a9643a6 to
850de54
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
💤 Files with no reviewable changes (3)
🚧 Files skipped from review as they are similar to previous changes (18)
📝 WalkthroughWalkthroughThe PR adds command URIs for notation note input, durations, dots, accidentals, rests, and notation additions. It expands controller APIs for note-input state, selection properties, and current notation parameters. Command registration and command-state computation are refactored around these APIs. Legacy notation UI actions and state helpers are removed, while menus, preferences, shortcuts, MIDI, braille, and mouse input dispatches are migrated to command URIs. Navigation dispatches also adopt command URIs. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp (1)
1377-1377: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider using the
TOGGLE_NOTE_INPUT_COMMANDconstant instead of a hardcoded string.This file is in the notationscene module and could include
notationcommands.hto use theTOGGLE_NOTE_INPUT_COMMANDconstant, preventing typos and easing future refactoring. The command constants are defined insrc/notationscene/notationcommands.hand already used byNotationActionController.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp` at line 1377, Replace the hardcoded command string in notationviewinputcontroller::dispatch with the existing TOGGLE_NOTE_INPUT_COMMAND constant. Include notationcommands.h in notationviewinputcontroller.cpp if needed, and update the call site so the command stays consistent with NotationActionController and avoids typo-prone string literals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitmodules:
- Line 3: The muse_framework submodule URL was changed to an SSH fork URL, which
breaks the expected repo contract and CI checks. Update the .gitmodules entry
for submodule.muse_framework back to the upstream HTTPS URL so fresh clones and
.github/workflows/check_submodules.yml continue to work without private SSH
access.
In `@src/notationscene/internal/notationcommandsstate.cpp`:
- Around line 197-199: The checked-state logic in notationcommandsstate.cpp for
TOGGLE_NOTE_INPUT_COMMAND is incorrect because it compares noteInputMethod()
against NoteInputMethod::UNKNOWN, so the main note-input toggle never becomes
checked. Update the CommandState returned from the NOTE_INPUT_COMMANDS branch in
notationcommandsstate::stateForCommand (or equivalent lookup path) so the toggle
command uses only controller()->isNoteInputMode() for its checked state, while
keeping the existing method-specific comparison for the other note-input
commands.
---
Nitpick comments:
In
`@src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp`:
- Line 1377: Replace the hardcoded command string in
notationviewinputcontroller::dispatch with the existing
TOGGLE_NOTE_INPUT_COMMAND constant. Include notationcommands.h in
notationviewinputcontroller.cpp if needed, and update the call site so the
command stays consistent with NotationActionController and avoids typo-prone
string literals.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 55422158-971b-441f-bd89-f4de6a73d53e
📒 Files selected for processing (24)
.gitmodulesmusesrc/app/configs/data/shortcuts.jsonsrc/app/configs/data/shortcuts.xmlsrc/appshell/qml/MuseScore/AppShell/appmenumodel.cppsrc/braille/internal/notationbraille.cppsrc/context/internal/shortcutresolver.cppsrc/context/internal/shortcutresolver.hsrc/notation/internal/notationinteraction.cppsrc/notation/internal/notationmidiinput.cppsrc/notationscene/inotationcommandscontroller.hsrc/notationscene/internal/notationactioncontroller.cppsrc/notationscene/internal/notationactioncontroller.hsrc/notationscene/internal/notationcommandsregister.cppsrc/notationscene/internal/notationcommandsstate.cppsrc/notationscene/internal/notationcommandsstate.hsrc/notationscene/internal/notationuiactions.cppsrc/notationscene/internal/notationuiactions.hsrc/notationscene/notationcommands.hsrc/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cppsrc/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.cppsrc/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.hsrc/preferences/qml/MuseScore/Preferences/noteinputpreferencesmodel.cppsrc/web/appshell/view/appmenumodel.cpp
💤 Files with no reviewable changes (3)
- src/notationscene/internal/notationuiactions.h
- src/app/configs/data/shortcuts.xml
- src/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.h
| Tie* newTie = mu::engraving::EditTie::cmdToggleTie(score()); | ||
|
|
||
| notifyAboutNotationChanged(); | ||
| m_selectionChanged.notify(); |
There was a problem hiding this comment.
We should use notifyAboutSelectionChangedIfNeed() instead
5214a32 to
2c93a62
Compare
2c93a62 to
77490b7
Compare
No description provided.