Skip to content

[JS] Split form and non-form modals and support custom modal footers#10695

Draft
MaximeBICMTL wants to merge 2 commits into
aces:mainfrom
MaximeBICMTL:refactor-modals
Draft

[JS] Split form and non-form modals and support custom modal footers#10695
MaximeBICMTL wants to merge 2 commits into
aces:mainfrom
MaximeBICMTL:refactor-modals

Conversation

@MaximeBICMTL

@MaximeBICMTL MaximeBICMTL commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

This PR refactors the LORIS modal to make two major changes:

  • Separate form and non-form general modals into separate reusable components.
  • Make modal footers optional and allow consumers to provide their own footer for the generic modal.

Architecture

  • The Modal component from jsx/Modals.tsx is split into three components:
    • Modal: The general non-form modal, which allows the consumer to provide the body and optionally the footer.
    • FormModal: The form modal, which is similar to the current modal and provides form and submit logic/controls.
    • ModalFrame: common architecture between the two modals, technically FormModal could also be made to depend directly upon Modal but this would require some higher-order component machinery because the form body and content should both be wrapper in a form element, and this wrapper is undesirable in the general case.
  • The styling relies less on bootstrap and more on flexbox for layout.
  • The modals can be scrollable, not sure if that was the case before or not.

Examples

[TODO: provide videos]

@github-actions github-actions Bot added Language: Javascript PR or issue that update Javascript code Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Jun 26, 2026
@MaximeBICMTL MaximeBICMTL marked this pull request as draft June 26, 2026 11:29
@MaximeBICMTL MaximeBICMTL added Category: Feature PR or issue that aims to introduce a new feature Category: Refactor PR or issue that aims to improve the existing code labels Jun 26, 2026
@MaximeBICMTL MaximeBICMTL changed the title [JS] Split form and non-form modal and support custom modal footers [JS] Split form and non-form modals and support custom modal footers Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Feature PR or issue that aims to introduce a new feature Category: Refactor PR or issue that aims to improve the existing code Language: Javascript PR or issue that update Javascript code Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module Module: instrument_manager PR or issue related to instrument_manager module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant