Skip to content

[javascript] Refactor LORIS panels - #11229

Open
MaximeBICMTL wants to merge 1 commit into
aces:mainfrom
MaximeBICMTL:panel-refactor
Open

MaximeBICMTL wants to merge 1 commit into
aces:mainfrom
MaximeBICMTL:panel-refactor

Conversation

@MaximeBICMTL

@MaximeBICMTL MaximeBICMTL commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

The electrophysiology browser, largely refactored in #11003, currently has its own Panel component. This component is very similar to the main Panel LORIS component but seems to contain a few bug fixes that were never upstreamed to the main component. This PR refactors the main LORIS component so that the electrophysiology browser can reuse it instead of having its own implementation.

List of changes

  • Convert the Panel component from vanilla Javascript to Typescript.
  • Remove prop-types from the component, which also were not in sync with the declared component types (string vs ReactNode).
  • Rename the collapsing, initCollapsed, and class props to the more conventional collapsible, defaultCollapsed, and className props respectively.
  • Fix the currently non-working defaultCollapsed prop.
  • Change the default collapsible prop from true to false.
  • Extract the views feature of the panel component, currently only used in the statistics dashboard (and arguably ugly IMO), into its own component. The architecture used here is the same as in the Modal refactor ([javascript] Split form and non-form modals and support custom modal footers #10695): a base highly-customisble PanelFrame component, a main Panel component easier to use with reasonable defaults, and a specialized PanelViews component that implements the desired feature.

better panel api
@github-actions github-actions Bot added Language: Javascript PR or issue that update Javascript code Module: statistics PR or issue related to statistics module Module: issue_tracker PR or issue related to issue tracker module Module: candidate_profile PR or issue related to candidate_profile module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: login PR or issue related to login module Module: dataquery PR or issue related to (new) dataquery module labels Sep 28, 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

Language: Javascript PR or issue that update Javascript code Module: candidate_profile PR or issue related to candidate_profile module Module: dataquery PR or issue related to (new) dataquery module Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: issue_tracker PR or issue related to issue tracker module Module: login PR or issue related to login module Module: statistics PR or issue related to statistics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant