Skip to content

feat: update production - #312

Merged
NishaSharma14 merged 23 commits into
mainfrom
development
Oct 21, 2026
Merged

NishaSharma14 merged 23 commits into
mainfrom
development

Conversation

@hamed-musallam

Copy link
Copy Markdown
Collaborator

Add support for loading spectra directly from external repositories by passing a spectra=<source>:<id> query param (e.g. spectra=nmrxiv:s150),

Currently only supported nmrxiv as a source

Add support for loading spectra directly from external repositories by
passing a `spectra=<source>:<id>` query param (e.g. `spectra=nmrxiv:s150`),

Currently only supported `nmrxiv` as a source
Update NMRium core packages and related dependencies to support NMRium v2.6.0.
@hamed-musallam hamed-musallam changed the title feat: load spectra from external sources via spectra query param feat: update production Aug 27, 2026
vcnainala and others added 13 commits October 3, 2026 17:56
Allow embedding hosts to highlight a peak by id or nucleus+ppm over the
existing nmr-wrapper:action-request channel, without reloading spectrum state.
Avoid import() return types, fix import order, and stop updating refs during render.
…uest

feat: add highlightPeak action-request for host-driven peak highlighting
…tion-request"

This reverts commit 2193ddf, reversing
changes made to ffb97b5.
revert: remove highlightPeak bridge pending controllable NMRium API
chore: update eslint to version 10

chore: remove unused Babel

chore: block TypeScript 7 updates
… 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.
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.
Per review, the wrapper no longer stores NMRium's state or resolves
peaks, ranges or signals. Hosts look up the ids in their own data and
send them; the wrapper forwards them to NMRium's highlightedIds prop.

Replace highlightPeak and highlightSignal with a single
highlight { ids: string[] } action and drop the automatic tab switch;
hosts send selectTab first. Invalid ids emit nmr-wrapper:error.
Firefox opens the QM fixture on the 13C tab and Chromium on 1H, so the
1H highlight tests found nothing to highlight in Firefox. Select 1H
first, and start the selectTab test on 1H so it switches tabs in every
browser.
feat: add highlight action-request that forwards ids to NMRium's highlightedIds
@NishaSharma14
NishaSharma14 requested review from NishaSharma14 and vcnainala and removed request for vcnainala October 16, 2026 07:57

Copilot AI 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.

🟡 Changes recommended

Critical configuration, packaging, and source-dispatch issues remain, and production query loading lacks deterministic coverage.

3 open issues
1 file not reviewed
  • src/demo/data/qm-signals.json: Generated file
What changed in this PR

Adds spectra=<source>:<id> loading for external repositories, currently nMRXiv, plus highlighting support and tooling updates.

Changes:

  • Adds source parsing, nMRXiv fetching, and external spectrum loading.
  • Adds highlight/clear-highlight actions, demo data, and E2E coverage.
  • Updates dependencies, configuration, and utilities.
File Summary
vite.config.ts Adjusts PWA imports.
test-e2e/​NmriumWrapperPage.ts Refactors page helpers.
test-e2e/​core.test.ts Adds highlight-action tests.
src/​utilities/​parseSpectraSource.ts Parses spectrum source identifiers.
src/​utilities/​loadFilesFromURLs.ts Refines archive naming.
src/​NMRiumWrapper.tsx Integrates external loading and highlighting; query loading needs deterministic coverage.
src/​modal/​AboutUsModal.tsx Simplifies component exports.
src/​hooks/​usePreferences.ts Reads the spectra query parameter.
src/​hooks/​useLoadSpectra.ts Adds filtering and updated load options.
src/​events/​types.ts Extends load and action event types.
src/​demo/​NMRiumWrapperDemo.tsx Adds QM signal and highlight controls.
src/​demo/​data/​qm-signals.json Adds QM signal fixtures.
src/​data-source/​nmrxiv.ts Implements nMRXiv fetching.
src/​data-source/​loadSpectraFromSource.ts Dispatches source loaders; needs safe source validation.
src/​config/​nmrxiv/​nmrxiv.production.json Defines the production API URL.
src/​config/​nmrxiv/​nmrxiv.development.json Defines the development API URL.
src/​config/​nmrxiv/​index.ts Selects environment configuration; package compatibility needs correction.
package.json Updates dependencies and scripts.
eslint.config.mjs Updates ESLint configuration.
babel.config.js Removes Babel configuration; Jest transformation needs preservation or replacement.
.ncurc.yml Updates dependency-update rules; indentation must use spaces.

Review effort: Lite

Comment thread .ncurc.yml Outdated
Comment thread src/config/nmrxiv/index.ts Outdated
Comment thread src/data-source/loadSpectraFromSource.ts Outdated
hamed-musallam and others added 2 commits October 21, 2026 12:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

🔵 Needs a closer look

Removing babel.config.js leaves the TypeScript Jest tests without a configured transform, causing the existing test command to fail during parsing.

No open issues 🎉

3 resolved since last review
1 file not reviewed
  • src/demo/data/qm-signals.json: Generated file

Review effort: Lite

Copilot AI 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.

🟡 Changes recommended

Resolve the Jest configuration breakage, concurrent loading issues, missing loading state, and unsafe nmrXiv ID interpolation.

1 open issue
1 file not reviewed
  • src/demo/data/qm-signals.json: Generated file

Review effort: Lite

Comment thread src/data-source/nmrxiv.ts
Accept only uppercase S or P followed by digits and reject invalid
IDs before fetching to prevent path, query, or fragment manipulation.

closes  #319
@NishaSharma14
NishaSharma14 merged commit caea6b8 into main Oct 21, 2026
5 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.

4 participants