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-3773 Support Summary Tiles component in esm-styleguide commons-lib #1113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kajambiya
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. Ensure your PR title includes a conventional commit label (such as feat, fix, or chore, among others). See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

This PR introduces the summary tile/card summary component to esm-styleguide.

Screenshots

Screenshot 2024-08-14 at 14 26 52

Related Issue

Other

@kajambiya kajambiya marked this pull request as ready for review August 16, 2024 05:51
@kajambiya kajambiya requested a review from ibacher August 16, 2024 05:51
Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

  • Please look through the checklist on the PR. There are items there that absolutely need to be done.
  • Were you able to generate that screen shot using this version of the component?
  • I don't really understand the need for this component per se. Where is this intended to be used? How many times do we need it?

@use '@carbon/styles/scss/colors';
@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@import '../root.scss';
Copy link
Member

Choose a reason for hiding this comment

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

Don't do this. Follow the guidelines Dennis suggested yesterday on the call (or look through the developer docs)

<h4 className={styles.title}> {headerTitle} </h4>
</div>
{maxRowItems ? (
groupedColumns.map((group) => (
Copy link
Member

Choose a reason for hiding this comment

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

Any time you're using a map you should supply a key to the component, either derived from the data or at least using the index of the item.

padding: spacing.$spacing-04 0 spacing.$spacing-04 spacing.$spacing-05;
}

.cardTitle > h4:after {
Copy link
Member

Choose a reason for hiding this comment

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

The h4 element has a class, so it seems like this could be better written using .title:after

.cardTitle > h4:after {
content: '';
display: block;
width: 2rem;
Copy link
Member

Choose a reason for hiding this comment

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

Please use the Carbon tokens for defining spacing wherever possible. This helps ensure that the UI remains consistent with Carbon guidelines.


.tile {
height: 100%;
padding: 1px 0 16px 16px;
Copy link
Member

Choose a reason for hiding this comment

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

Nothing over 1px should be specified in px.

flex-direction: 'row';
}

.widgetContainer {
Copy link
Member

Choose a reason for hiding this comment

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

A number of these rules seem to not be used by this component, so they probably don't belong here.

@gracepotma
Copy link
Contributor

@ibacher to answer your question:

I don't really understand the need for this component per se. Where is this intended to be used? How many times do we need it?

It's a useful feature to have a clinical area-specific summary within different clinical views. This was actually a make-or-break requirement for Ampath at the very beginning of O3 :) The user story is, "As a healthcare staff member focused on X condition (eg HIV clinic, MCH clinic, etc), I need to immediately see some very specific information summarized for me, so I can rapidly get the key information relevant to my specialty." Examples here from OHRI:

image image

@ibacher
Copy link
Member

ibacher commented Aug 20, 2024

It seems then like this belongs more readily in the patient chart then, rather than the styleguide, more exactly, in the patient-common-lib.

@kajambiya
Copy link
Contributor Author

It seems then like this belongs more readily in the patient chart then, rather than the styleguide, more exactly, in the patient-common-lib.

My thoughts too. If there's no objection to this, I'm going to proceed and and transfer this code to patient-chart.
I guess the same applies to encounter-list as well.
CC: @ebambo

@ebambo
Copy link

ebambo commented Aug 21, 2024

It seems then like this belongs more readily in the patient chart then, rather than the styleguide, more exactly, in the patient-common-lib.

My thoughts too. If there's no objection to this, I'm going to proceed and and transfer this code to patient-chart. I guess the same applies to encounter-list as well. CC: @ebambo

No objections from my side, as long as this still works fine with the work @hadijahkyampeire is doing with the config schema.

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.

4 participants