-
Notifications
You must be signed in to change notification settings - Fork 251
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
OHRI-452 Form Patient Banner - Optional hideActionsOverflow, optional param #598
OHRI-452 Form Patient Banner - Optional hideActionsOverflow, optional param #598
Conversation
File size impactMerging feature/ohri-452-overall-ui into master impact files as follow: @openmrs/esm-form-entry-app (+8.02%)
@openmrs/esm-generic-patient-widgets-app (no impact)
@openmrs/esm-patient-allergies-app (no impact)
@openmrs/esm-patient-appointments-app (no impact)
@openmrs/esm-patient-attachments-app (no impact)
@openmrs/esm-patient-banner-app (+0%)
@openmrs/esm-patient-biometrics-app (no impact)
@openmrs/esm-patient-chart-app (no impact)
@openmrs/esm-patient-clinical-view-app (no impact)
@openmrs/esm-patient-common-lib (no impact)No file in @openmrs/esm-patient-common-lib group (see config below). {
"./packages/esm-patient-common-lib/dist/*.js": true,
"./packages/esm-patient-common-lib/dist/*.css": true,
"./packages/esm-patient-common-lib/dist/*.map": false,
"./packages/esm-patient-common-lib/dist/*.txt": false,
"./packages/esm-patient-common-lib/dist/*.json": false
} @openmrs/esm-patient-conditions-app (no impact)
@openmrs/esm-patient-forms-app (no impact)
@openmrs/esm-patient-immunizations-app (no impact)
@openmrs/esm-patient-medications-app (no impact)
@openmrs/esm-patient-notes-app (no impact)
@openmrs/esm-patient-programs-app (no impact)
@openmrs/esm-patient-test-results-app (no impact)
@openmrs/esm-patient-vitals-app (no impact)
|
patientUuid, | ||
onClick, | ||
onTransition, | ||
hideActionsOverflow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be preferable, I think, to do this via configuration, not through code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will you otherwise be passing this prop to the banner? Perhaps the configuration happens upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this solution took a lot of turns.
1st Initially the plan was to make a stylesheet appracoach
2nd Tried using hooks, but then after an event, the re-render was paiting again the Action.
3rd Is the current commit.
The alternative way would be below.
Have to refactor the module and:
-
In patient-banner-component.tsx: Add an extension slot to act as a container for the Actions Overflow (actions-overflow-container)
-
In /src, create a new folder (actions) with a component that returns the code for CustomOverflowMenuComponent
-
In /src/index.ts, attach the actions component to the actions-overflow-container extension
-
In OHRI, add config to remove actions-overflow-container extension when rendering OHRIForm
This does mean it will, work cause every time I try something, there is a new side-effect I learn from the esm behaviour.
@samuelmale @brandones your views?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to completely refactor this component, @larslemos . This solution is temporary. As stated below.
@jonathandick , we need to refactor this component badly anyway. I think this will be lower-effort to refactor than by using the config for this. https://issues.openmrs.org/browse/O3-1161 |
Requirements
Summary
Screenshots
This is the current Patient Banner on the Form:
The objective is to make this an option Overflow Button, since for this scenario, the actions don't apply for our context.
Related Issue
https://issues.openmrs.org/browse/O3-1154?atlLinkOrigin=c2xhY2staW50ZWdyYXRpb258aXNzdWU%3D
Other