-
Notifications
You must be signed in to change notification settings - Fork 522
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
Sidebar Duotone icons #9281
Sidebar Duotone icons #9281
Conversation
WalkthroughThe pull request introduces significant modifications to the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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. |
Deploying care-fe with Cloudflare Pages
|
CARE Run #3986
Run Properties:
|
Project |
CARE
|
Branch Review |
sidebar-icons
|
Run status |
Passed #3986
|
Run duration | 05m 10s |
Commit |
6193100587: Sidebar Duotone icons
|
Committer | Shivank Kacker |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
135
|
View all changes introduced in this branch ↗︎ |
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: 0
🧹 Outside diff range and nitpick comments (2)
src/CAREUI/icons/CareIcon.tsx (1)
31-34
: Consider memoizing the icon data selection.The type assertion and conditional selection of icon data on each render could impact performance for frequently re-rendered components.
Consider memoizing the icon data selection:
- const [viewBox, path, fill, strokeWidth, secondaryPath] = ( - (icon.startsWith("d-") ? duoToneIconData : iconData) as typeof iconData & - typeof duoToneIconData - )[icon] as [ + const iconSource = useMemo(() => + (icon.startsWith("d-") ? duoToneIconData : iconData) as typeof iconData & + typeof duoToneIconData + , [icon]); + const [viewBox, path, fill, strokeWidth, secondaryPath] = iconSource[icon] as [src/components/Facility/DischargedPatientsList.tsx (1)
Line range hint
484-487
: Update PatientListItem to use duotone icon.The PatientListItem component still uses the legacy "l-user-injured" icon while the parent component has been updated to use duotone icons.
Apply this change for consistency:
- icon="l-user-injured" + icon="d-patient"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (10)
src/CAREUI/icons/CareIcon.tsx
(3 hunks)src/CAREUI/icons/DuoTonePaths.json
(1 hunks)src/components/Assets/AssetsList.tsx
(1 hunks)src/components/Common/Sidebar/Sidebar.tsx
(1 hunks)src/components/Facility/DischargedPatientsList.tsx
(1 hunks)src/components/Facility/FacilityList.tsx
(1 hunks)src/components/Facility/FacilityUsers.tsx
(1 hunks)src/components/Patient/ManagePatients.tsx
(1 hunks)src/components/Patient/SampleViewAdmin.tsx
(1 hunks)src/components/Users/ManageUsers.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- src/components/Facility/FacilityUsers.tsx
- src/components/Facility/FacilityList.tsx
- src/components/Patient/SampleViewAdmin.tsx
- src/components/Assets/AssetsList.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/Common/Sidebar/Sidebar.tsx
🔇 Additional comments (7)
src/CAREUI/icons/CareIcon.tsx (3)
1-1
: LGTM: Import statement is correctly placed.
The new import for duotone icons is appropriately placed alongside the existing icon data import.
5-5
: LGTM: Type definition is correctly updated.
The IconName type now properly includes both regular and duotone icons through a union type.
59-67
: LGTM: Secondary path implementation is correct.
The conditional rendering of the secondary path with opacity is well implemented. The opacity value of 0.32 creates the duotone effect.
src/CAREUI/icons/DuoTonePaths.json (1)
1-72
: LGTM: Icon definitions are well-structured.
The JSON file follows a consistent structure for all icons with appropriate naming conventions using the "d-" prefix.
src/components/Facility/DischargedPatientsList.tsx (1)
291-291
: LGTM: CountBlock icon updated to use duotone style.
The icon prop is correctly updated to use the new duotone patient icon.
src/components/Users/ManageUsers.tsx (1)
557-557
: Icon update aligns with duotone design system
The change from "l-user-injured" to "d-people" is semantically appropriate for representing users and follows the new duotone icon design system.
src/components/Patient/ManagePatients.tsx (1)
983-983
: Icon update improves semantic representation
The change from "l-user-injured" to "d-patient" is a better semantic representation for patients and aligns with the new duotone icon design system.
LGTM |
@shivankacker 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
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Improvements