-
Notifications
You must be signed in to change notification settings - Fork 230
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
(fix) O3-4116 use correct colours for service queue priority #1376
Conversation
Yeah, the patient chart ought to be using the same component as the services queues app to render those priority tags. It's usually done through extensions (https://o3-docs.openmrs.org/docs/extension-system). I suggest having the PriorityTag be its own component so it's closer to what we want.
|
…eues-app config schema
Hi @chibongho - thanks for the input! I thought the extension system is more for cases where we might want to swap out or swap in various extensions into a slot. I also looked at the patient chart implementation a bit more, seems there's also a bit different behavior, e.g. what's 'Urgent' on the service queue is 'Priority' in the patient chart. |
Yeah, you're right. (In fact, the extension system has often been misused for other purposes.) I would not be opposed to putting the priority tag in a common library. I guess one reason for using an extension is that it is possible for certain implementation to have the patient chart but not service queues functionality (although the current patient chart code isn't respecting that either.) As for which common library to put it in,
TBH, the behavior in patient chart is probably wrong. But yeah, let's not worry about that for now. I was suggesting that we have the priority tag be its own component, mostly to avoid the big |
I’d prefer to do things in the styleguide than in the patient-common-lib. As much as possible, we want to avoid adding things there that are used outside the patient chart (and we’ve been trying to remove the stuff that makes things like patient management depend on it). It’s not clear to me what this would add as a generic component over and above the Carbon Tag element (in particular, things that need configuration are a poor fit for the styleguide or the patient common lib). |
@ibacher - I guess the main addition on top of the Carbon Tag element would be the orange color for Priority / Urgent. @chibongho I've pulled the tag into a variable to avoid the duplication - if we pulled it out into its own component there isn't really much left in QueuePriority so I kept the two things together |
packages/esm-service-queues-app/src/queue-entry-table-components/queue-priority.scss
Outdated
Show resolved
Hide resolved
The capitalization here is a non-code issue, so I wouldn't worry about it. Fixing capitalization in code always interferes with i18n. |
…ular shade of orange
Hi! Any more feedback? I'll be on vacation from the end of the week so any later feedback I won't be able to work on for a few weeks. |
Requirements
Summary
(First PR here so please let me know if I'm doing something wrong)
O3-4116 notes that priority tags in the service queue view don't have any color.
Implementers were already able to configure this, however this was probably not used frequently. So I'm guessing the intended behaviour is a default configuration that can be overwritten if necessary. This is what this PR adds.
The PR also adds support for the orange color intended for the 'urgent' priority that was still missing.
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-4116
Other
I'm not very happy the way the orange color is handled: Seems like the carbon design system does not have a color 'orange' so I implemented it as a special case similar to how the tags for the header in the patient-chart are implemented. I'm also hardcoding the same color. This seems to be slightly smelly. I'm guessing this component in this color is used in a few different places so there should be a generic solution for this problem but I'm not sure how to approach it... Suggestions welcome!
Also, the issue also asks for fixing capitalization for 'Not Urgent' - I haven't looked into this yet so might be another PR