Conversation
… API Add highlightPeak, highlightSignal and clearHighlight action requests on top of NMRium's public highlight / onHighlightChange props instead of aliasing its private highlight module. highlightSignal resolves a 1D signal by id or nucleus + delta and also highlights its parent range and the peaks inside that range. Host-driven highlights use an UNKNOWN source so NMRium's Delete/Backspace handler cannot delete the highlighted peak or signal.
vcnainala
force-pushed
the
feat/highlight-peak-controllable
branch
2 times, most recently
from
October 4, 2026 09:58
a076b40 to
e6c826d
Compare
3 of 5 tasks
Switch from the controlled highlight / onHighlightChange API (#4402) to the additive highlightedIds prop from cheminfo/nmrium#4405. Host highlights no longer touch NMRium's internal highlight state, so the sourceData workaround and the permanent option are gone. Drop the embedding settings from the QM demo fixture: they hide NMRium's panels, which the demo and e2e tests rely on.
4 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nmr-wrapper:action-requestchannel, using NMRium's publichighlightedIdsprop (feat: support externally controlled highlights cheminfo/nmrium#4405) instead of aliasing NMRium's private highlight module (feat: add highlightPeak action-request for host-driven peak highlighting #315, reverted in revert: remove highlightPeak bridge pending controllable NMRium API #316).highlightPeak,highlightSignal,clearHighlight. Both highlight actions acceptid, ornucleus+ppm(+ optionaltolerance).highlightSignalresolves a 1D signal by id ornucleus+deltaand passes the signal id, its parent range id and the ids of peaks inside that range, so a single request lights up the multiplet, the range box, the ranges-table row and the peak.nucleusis given, the wrapper switches to that nucleus tab before highlighting.highlightedIdsis additive: NMRium's own hover/click highlighting keeps working, and host highlights stay until the next highlight orclearHighlight. Because host highlights never enter NMRium's internal highlight state, Delete/Backspace cannot remove the highlighted peak or range.nmr-wrapper:errorinstead of throwing.Blocked on: an NMRium release that contains cheminfo/nmrium#4405. That PR targets NMRium 3 (React 19); this repo is on React 18 with
nmrium@^2.7.0, so it needs either a 2.x release with the change or a React 19 upgrade here. CI type checks fail untilnmriumis bumped. Locally this was tested against a packed 2.8 build with the #4405 change applied (npm install --no-save).Stacked on #316.
Test plan
npm run check-types, eslint, prettier (against the 2.8 build with #4405 applied)npx playwright test --project chromium: all 10 pass, including highlight a peak, highlight a signal with its range and peak, and highlight a signal on another nucleus tabnmriumonce released and re-run CIid, nonucleus+ppm) emitnmr-wrapper:errorwithout breaking later requests