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

MF-635: Fix patient chart widget card headers #446

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

denniskigen
Copy link
Member

@denniskigen denniskigen commented Oct 30, 2021

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

This PR changes the header designs of all the widgets in the patient chart. The card headers should have 3rem height on the desktop viewport and 4.5rem on a tablet. Additionally, the widget titles on the card headers change depending on the viewport.

Screenshots

Desktop

Screenshot 2021-10-30 at 01 17 35

Empty / error state

Screenshot 2021-10-30 at 00 52 58

Tablet

Screenshot 2021-10-30 at 17 13 34

Issue

https://issues.openmrs.org/projects/MF/issues/MF-635

Comment on lines +16 to +23
h4:after {
content: "";
display: block;
width: 2rem;
padding-top: 0.188rem;
border-bottom: 0.375rem solid $brand-teal-01;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking it might be nice to factor styles out to esm-patient-chart/esm-patient-common-lib, if that's possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe if this CardHeader was a standalone component in esm-patient-common-lib.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ehhhhhh up to you. We can do it in a separate PR if you think it's worth it.

Copy link
Member Author

@denniskigen denniskigen Nov 4, 2021

Choose a reason for hiding this comment

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

I've worked on this here.

Copy link
Contributor

@brandones brandones left a comment

Choose a reason for hiding this comment

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

Looks good. One suggestion for refactoring.

@brandones
Copy link
Contributor

Looks like we got conflicts; feel free to merge after fixing.

@denniskigen denniskigen force-pushed the MF-635-widget-headers branch from 6139e20 to 5dd0dce Compare November 2, 2021 18:05
@denniskigen denniskigen merged commit 29e3468 into master Nov 2, 2021
@denniskigen denniskigen deleted the MF-635-widget-headers branch November 2, 2021 18:21
denniskigen added a commit that referenced this pull request Nov 3, 2021
`useLayoutType` is being imported from the wrong package in the ErrorState component - a change mistakenly introduced in #446.
As a result, an error is displayed instead of the appointments widget. This commit fixes the import and thus fixes the error.
brandones pushed a commit that referenced this pull request Nov 3, 2021
* Fix incorrect useLayoutType import

`useLayoutType` is being imported from the wrong package in the ErrorState component - a change mistakenly introduced in #446.
As a result, an error is displayed instead of the appointments widget. This commit fixes the import and thus fixes the error.

* Fix failing AllergyForm test

This test was failing because of a missing implementation for `useLayoutType`. Despite a manual mock being available for `esm-framework`, this test suite was overriding that manual
mock without providing a suitable alternative (a partial mock or similar). This commit fixes that problem by removing the partial mock of `esm-framework` and relying entirely on the
already available manual mock.
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.

2 participants