-
Notifications
You must be signed in to change notification settings - Fork 248
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-3656: Change the style of abnormal and dangerous lab results #1942
Conversation
Size Change: -45.4 kB (-0.41%) Total Size: 11.1 MB
ℹ️ View Unchanged
|
packages/esm-patient-labs-app/src/test-results/panel-timeline/timeline.scss
Outdated
Show resolved
Hide resolved
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.
Thanks @CynthiaKamau, shouldn't we adopt the new results table design specified in this design guide? Or would that be outside the scope of this ticket?
@arodidev that's beyond the scope of this simple style tweak. |
76e07b3
to
7fa2d35
Compare
I was actually making more edits |
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.
Sorry for blowing your PR up a touch @CynthiaKamau, but I had to make some additional changes to:
- Fix the styling used in Panel view to highlight abnormal values.
- Extend the changes in the Timeline view to the GroupedTimeline view.
- Fix component names to match our naming conventions so that i18next-parser knows to extract translation strings and keys from them.
I've left comments and screenshots explaining the rationale and showing the before and after states of the UI.
} | ||
|
||
.criticallyHigh, | ||
.criticallyLow { | ||
box-shadow: 0 0 0 1px $danger, inset 0 0 0 1px $danger; | ||
background-color: colors.$red-20; | ||
border-top: 1px solid colors.$red-20-hover; |
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 should use border-top
here instead of box-shadow
to better align with the design.
<div className={styles.timelineHeader}> | ||
<div className={styles.timelineHeader}> |
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.
The same inline styles are duplicated in the stylesheet. Also, I'm not sure why both the parent and child div
should have the same styling.
interface DateHeaderGridProps { | ||
timeColumns: Array<string>; | ||
yearColumns: Array<Record<string, number | string>>; | ||
dayColumns: Array<Record<string, number | string>>; | ||
showShadow: boolean; | ||
} | ||
|
||
interface DataRowsProps { | ||
rowData: Record<string, Array<ObsRecord>>; | ||
timeColumns: Array<string>; | ||
sortedTimes: Array<string>; | ||
showShadow: boolean; | ||
testUuid: string; | ||
} | ||
|
||
interface TimelineParams { | ||
parsedTime: ParsedTimeType; | ||
rowData: Record<string, Array<ObsRecord>>; | ||
panelName: string; | ||
sortedTimes: Array<string>; | ||
testUuid: string; | ||
} |
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.
I've just moved the type annotations higher up for clarity and improved organization.
@@ -83,7 +89,7 @@ | |||
|
|||
.time-slot-inner { | |||
background-color: $ui-03; | |||
padding: 3px 10px; | |||
padding: 1px 10px; |
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.
className={classNames(styles.labSetPanel, { | ||
[styles.activePanel]: activePanel?.conceptUuid === panel.conceptUuid, | ||
})} |
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.
@@ -139,12 +144,14 @@ | |||
|
|||
.high, | |||
.low { | |||
box-shadow: 0 0 0 1px #000000; | |||
background-color: colors.$orange-10; |
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.
&:hover { | ||
background-color: colors.$blue-10; | ||
border-top: 2px colors.$blue-30; | ||
} | ||
} |
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.
.high, | ||
.low { | ||
border: 2px solid black !important; | ||
td { | ||
background-color: colors.$orange-10; | ||
border-top: 1px solid colors.$orange-20; | ||
} | ||
} | ||
|
||
.critically-high, | ||
.critically-low { | ||
border: 2px solid $danger !important; | ||
td { | ||
background-color: colors.$red-20; | ||
border-top: 1px solid colors.$red-20-hover; | ||
} |
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.
#1942) * O3-3656 Change the style of abnormal and dangerous lab results * Additional mods --------- Co-authored-by: Dennis Kigen <[email protected]>
Requirements
Summary
Screenshots
Screen.Recording.2024-07-31.at.09.56.09.mov
Related Issue
https://openmrs.atlassian.net/browse/O3-3656
Other