Repository navigation
[javascript] Refactor LORIS panels - #11229
Open
MaximeBICMTL wants to merge 1 commit into
Open
MaximeBICMTL wants to merge 1 commit into
MaximeBICMTL wants to merge 1 commit into
Conversation
better panel api
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.
Description
The electrophysiology browser, largely refactored in #11003, currently has its own
Panelcomponent. 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
prop-typesfrom the component, which also were not in sync with the declared component types (stringvsReactNode).collapsing,initCollapsed, andclassprops to the more conventionalcollapsible,defaultCollapsed, andclassNameprops respectively.defaultCollapsedprop.collapsibleprop fromtruetofalse.viewsfeature 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 theModalrefactor ([javascript] Split form and non-form modals and support custom modal footers #10695): a base highly-customisblePanelFramecomponent, a mainPanelcomponent easier to use with reasonable defaults, and a specializedPanelViewscomponent that implements the desired feature.