Skip to content

Fix OMR search navigation and zoom framing - #994

Merged
etosphere merged 1 commit into
mainfrom
fix/omr-result-focus-978
Aug 6, 2026
Merged

Fix OMR search navigation and zoom framing#994
etosphere merged 1 commit into
mainfrom
fix/omr-result-focus-978

Conversation

@etosphere

@etosphere etosphere commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Closes #978.

Summary by CodeRabbit

  • Improvements
    • Improved OMR search-result zooming with adaptive spacing for clearer page and region views.
    • Improved fold and unfold interactions in chant displays.
    • Improved exemplar selection in the neume gallery.
    • Enhanced result and selection interactions for more reliable navigation.

@etosphere
etosphere requested a review from kyrieb-ekat August 5, 2026 21:39
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0927bc6b-083b-4a19-91b2-e5756884aaa4

📥 Commits

Reviewing files that changed from the base of the PR and between 229b4d0 and 17d59dd.

⛔ Files ignored due to path filters (1)
  • nginx/static/js/app/cantus-min.js.map is excluded by !**/*.map
📒 Files selected for processing (7)
  • nginx/app/src/js/manuscript-detail/DivaBackend.js
  • nginx/app/src/js/manuscript-detail/folio/ChantCompositeView.js
  • nginx/app/src/js/manuscript-detail/folio/ChantItemView.js
  • nginx/app/src/js/search/omr-search/NeumeGalleryView.js
  • nginx/app/src/js/search/omr-search/ResultItemView.js
  • nginx/app/src/js/search/omr-search/ResultView.js
  • nginx/static/js/app/cantus-min.js
 ______________________________________________________________
< I had to scroll so far I hit the heat death of the universe. >
 --------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/omr-result-focus-978

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.

@etosphere etosphere self-assigned this Aug 5, 2026
@etosphere
etosphere changed the base branch from main to diva/6-v7-finalize-migration August 5, 2026 23:06
Base automatically changed from diva/6-v7-finalize-migration to main August 6, 2026 18:00
Two OMR search bugs were fixed:

- Clicking a result now navigates. ResultView used Marionette 2's
  childEvents, which backbone.marionette 4 ignores, so showResult never
  reached focusRegion. Switch to childViewEvents and pass the model
  explicitly (v4 no longer prepends the child view to the handler args).
- The jump to a result no longer over- or under-zooms. zoomToRegion's
  padding is a fraction of the region, so one value can't frame both
  small and large boxes; scale it to the box size, framing each result
  to a minimum share of the page so results of any size zoom alike.

The same Marionette-4 gap silently broke two sibling wirings, fixed here
too:

- NeumeGalleryView: clicking a neume exemplar adds it to the search
  again (replace the onChildviewExemplarClicked method with an
  explicit childViewEvents entry).
- ChantCompositeView: the chant fold/unfold state syncs again
  (childEvents -> childViewEvents; ChantItemView passes itself so the
  handlers keep their child.model access).

Rebuild the JS bundle. Closes #978.
@etosphere
etosphere force-pushed the fix/omr-result-focus-978 branch from 6f82161 to 17d59dd Compare August 6, 2026 18:00

@kyrieb-ekat kyrieb-ekat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@etosphere
etosphere merged commit 2c63ad7 into main Aug 6, 2026
0 of 3 checks passed
@etosphere
etosphere deleted the fix/omr-result-focus-978 branch August 6, 2026 18:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
nginx/app/src/js/search/omr-search/ResultView.js (1)

29-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for the model payload.

Extend nginx/app/src/js/search/omr-search/ResultView.spec.js to click a child .result-target and assert that zoomToResult receives the exact result model. Include a model with a populated boxes[0] entry so the OMR focus path is covered.

Also applies to: 50-51

🤖 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 `@nginx/app/src/js/search/omr-search/ResultView.js` around lines 29 - 30, Add
regression coverage in ResultView.spec.js for the childViewEvents
showResult-to-triggerZoomToResult flow: render a model with a populated boxes[0]
entry, click the child .result-target, and assert that zoomToResult is called
with the exact result model.
🤖 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.

Nitpick comments:
In `@nginx/app/src/js/search/omr-search/ResultView.js`:
- Around line 29-30: Add regression coverage in ResultView.spec.js for the
childViewEvents showResult-to-triggerZoomToResult flow: render a model with a
populated boxes[0] entry, click the child .result-target, and assert that
zoomToResult is called with the exact result model.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0927bc6b-083b-4a19-91b2-e5756884aaa4

📥 Commits

Reviewing files that changed from the base of the PR and between 229b4d0 and 17d59dd.

⛔ Files ignored due to path filters (1)
  • nginx/static/js/app/cantus-min.js.map is excluded by !**/*.map
📒 Files selected for processing (7)
  • nginx/app/src/js/manuscript-detail/DivaBackend.js
  • nginx/app/src/js/manuscript-detail/folio/ChantCompositeView.js
  • nginx/app/src/js/manuscript-detail/folio/ChantItemView.js
  • nginx/app/src/js/search/omr-search/NeumeGalleryView.js
  • nginx/app/src/js/search/omr-search/ResultItemView.js
  • nginx/app/src/js/search/omr-search/ResultView.js
  • nginx/static/js/app/cantus-min.js

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.

OMR result focus: clicks don't navigate, and the auto-jump zooms in too far

2 participants