Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) O3-3112: Re-instate the Form collapse #234

Closed
wants to merge 9 commits into from

Conversation

usamaidrsk
Copy link
Contributor

@usamaidrsk usamaidrsk commented Apr 26, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

The PR re-instates the form collapse functionality, and this depends on this (feat) O3-3112: Add form collapse toggle to the esm-form-engine-app

Screenshots

form-collapse.mp4

Related Issue

O3-3112

Other

@usamaidrsk usamaidrsk marked this pull request as draft April 26, 2024 05:57
@usamaidrsk usamaidrsk changed the title (feat) O3-3112: Fe-instate the Form collapse (feat) O3-3112: Re-instate the Form collapse Apr 26, 2024
import { SessionMode } from '../types';
import { useEffect, useState } from 'react';

export function useFormCollapse(sessionMode: SessionMode) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks over engineered. I would opt for passing this state to the FormEngine component within the esm-form-engine-app and use it to toggle the sections

@@ -18,6 +18,7 @@ function Sidebar({
setValues,
allowUnspecifiedAll,
defaultPage,
hideFormCollapseToggle,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason u added this to the sidebar? there no sections in the sidebar (side navigation)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to be called when the the form is cancelled, so as to remove the toggle from workspace header.

@usamaidrsk usamaidrsk marked this pull request as ready for review April 26, 2024 07:06
@usamaidrsk usamaidrsk closed this Apr 29, 2024
@usamaidrsk usamaidrsk deleted the ft-form-collapse branch April 29, 2024 17:16
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.

None yet

2 participants