-
Notifications
You must be signed in to change notification settings - Fork 533
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: Align and format cards in Health Profile #10298
fix: Align and format cards in Health Profile #10298
Conversation
WalkthroughThis pull request focuses on minor UI enhancements across several patient-related components. The changes primarily involve standardizing the layout and styling for scenarios where no medical records (diagnoses, symptoms, allergies) are present. The modifications include updating localization files with new keys for "no records" messages and adjusting the rendering of these messages within card components to ensure consistent padding and alignment. Changes
Assessment against linked issues
Possibly related PRs
Suggested Labels
Suggested Reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
src/components/Patient/MedicationStatementList.tsx (1)
Line range hint
183-191
: Fix fragment and key prop usage.The fragment (
<>...</>
) wrapping MedicationRow is unnecessary, and the key prop should be on the outermost element of the mapped items.- {filteredMedications.map((statement, index) => { - const isEnteredInError = statement.status === "entered_in_error"; - return ( - <> - <MedicationRow - key={statement.id} - statement={statement} - isEnteredInError={isEnteredInError} - index={index} - /> - </> - ); - })} + {filteredMedications.map((statement, index) => { + const isEnteredInError = statement.status === "entered_in_error"; + return ( + <MedicationRow + key={statement.id} + statement={statement} + isEnteredInError={isEnteredInError} + index={index} + /> + ); + })}src/components/Patient/diagnosis/list.tsx (1)
Line range hint
134-134
: Standardize padding in DiagnosisListLayout.The CardContent padding in DiagnosisListLayout (
px-2 pb-2
) differs from the empty state CardContent (px-2 pb-3 pt-2
). This inconsistency might cause layout shifts when toggling between states.- <CardContent className="px-2 pb-2">{children}</CardContent> + <CardContent className="px-2 pb-3 pt-2">{children}</CardContent>
🧹 Nitpick comments (4)
src/components/Patient/MedicationStatementList.tsx (1)
142-144
: Consider extracting common card header styles.The CardHeader styling
className="px-4 py-0 pt-4 flex justify-between flex-row"
appears to be repeated across components (also used in DiagnosisList). Consider extracting this into a shared style constant or component to maintain consistency.+ // src/constants/styles.ts + export const CARD_HEADER_STYLES = "px-4 py-0 pt-4 flex justify-between flex-row"; - <CardHeader className="px-4 py-0 pt-4 flex justify-between flex-row"> + <CardHeader className={CARD_HEADER_STYLES}>public/locale/en.json (3)
1307-1307
: Maintain consistent capitalization in "no records" messages.The capitalization of "Allergies" in this message differs from similar messages in the file. Consider standardizing the capitalization across all "no records" messages.
- "no_allergies_recorded": "No Allergies recorded", + "no_allergies_recorded": "No allergies recorded",
1323-1323
: Standardize capitalization in new message.The capitalization of "Diagnoses" should match other similar messages for consistency.
- "no_diagnoses_recorded": "No Diagnoses recorded", + "no_diagnoses_recorded": "No diagnoses recorded",
1374-1374
: Standardize capitalization in new message.The capitalization of "Symptoms" should match other similar messages for consistency.
- "no_symptoms_recorded": "No Symptoms recorded", + "no_symptoms_recorded": "No symptoms recorded",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
public/locale/en.json
(3 hunks)public/locale/ml.json
(2 hunks)src/components/Patient/MedicationStatementList.tsx
(1 hunks)src/components/Patient/allergy/list.tsx
(1 hunks)src/components/Patient/diagnosis/list.tsx
(1 hunks)src/components/Patient/symptoms/list.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- src/components/Patient/allergy/list.tsx
- src/components/Patient/symptoms/list.tsx
🔇 Additional comments (3)
src/components/Patient/diagnosis/list.tsx (1)
66-68
: Ensure sufficient color contrast for accessibility.The
text-muted-foreground
class is used for the "no diagnoses" message. Verify that this provides sufficient color contrast for accessibility.public/locale/ml.json (2)
1250-1250
: LGTM! Accurate Malayalam translation for "no diagnoses recorded".The translation is grammatically correct and maintains consistency with the application's terminology.
1292-1292
: LGTM! Accurate Malayalam translation for "no symptoms recorded".The translation is grammatically correct and maintains consistency with the application's terminology.
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
@ashwinpraveengo Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
Proposed Changes
en.json
andml.json
.CardContent
containers to improve UI and ensure proper alignment.Updated Design
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
Release Notes
Localization
UI Improvements
User Experience