Skip to content

[Core] Prepare components for React 19 - #11362

Open
HenriRabalais wants to merge 2 commits into
aces:mainfrom
HenriRabalais:2026-12-01_react19-prep
Open

HenriRabalais wants to merge 2 commits into
aces:mainfrom
HenriRabalais:2026-12-01_react19-prep

Conversation

@HenriRabalais

@HenriRabalais HenriRabalais commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

React 19 removes string refs and ignores defaultProps on function components. The replacements for both work on React 18 too, so they can go in ahead of the version bump in #11358.

Changes

  • String refs are gone from bvl_feedback, candidate_parameters, configuration, data_release, dqt, genomic_browser, instrument_builder, issue_tracker, media and publication. The ones that are read use createRef (the save message in candidate_parameters, the panes in instrument_builder and the required fields in the media upload form), and the ones nothing reads are removed.
  • The react/no-string-refs lint rule is on, so ESLint rejects a ref written as a quoted string.
  • FamilyInfo no longer loops over its refs after saving to clear the form. Its fields are controlled by formData, which the save already resets.
  • IssueForm no longer has isValidForm. It only looked up refs named title and assignee, which no field has.
  • Function components that used defaultProps take their defaults as default parameters: jsx/Panel.js, biobank's CustomFields, the electrophysiology viewer, dqt and the statistics widgets. Where a component passes props along as a whole, it rebuilds props from its parameters, so the rest of the component reads the same.
  • The electrophysiology prop types mark the defaulted props as optional.

Testing Instructions

  1. In candidate_parameters, save the Participant Status tab. The success message shows and fades out.
  2. In instrument_builder, load an instrument file and save it.
  3. In media, upload a file.
  4. Collapse and expand a panel on the dashboard, and change a filter on a statistics chart.
  5. Open an electrophysiology session. The signal viewer loads.
  6. In dqt, open the saved queries tab.

Related Issues

@HenriRabalais HenriRabalais added Category: Refactor PR or issue that aims to improve the existing code Language: Javascript PR or issue that update Javascript code labels Dec 1, 2026
@HenriRabalais HenriRabalais self-assigned this Dec 1, 2026
@github-actions github-actions Bot added Module: statistics PR or issue related to statistics module Module: dqt PR or issue related to (old) dqt module Module: candidate_parameters PR or issue related to candidate_parameters module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: publication PR or issue related to the publication module labels Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Refactor PR or issue that aims to improve the existing code Language: Javascript PR or issue that update Javascript code Module: candidate_parameters PR or issue related to candidate_parameters module Module: dqt PR or issue related to (old) dqt module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: publication PR or issue related to the publication module Module: statistics PR or issue related to statistics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants