-
Notifications
You must be signed in to change notification settings - Fork 532
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 PatientUsers
card overflow and Remove-button background
#10172
base: develop
Are you sure you want to change the base?
Fix PatientUsers
card overflow and Remove-button background
#10172
Conversation
WalkthroughThe pull request introduces modifications to the 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)
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. |
✅ 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: 0
🧹 Nitpick comments (2)
src/components/Patient/PatientDetailsTab/PatientUsers.tsx (2)
262-267
: Consider improving the responsive truncation implementation.While the truncation addresses the overflow issue, the current implementation has room for improvement:
- The
sm:max-w-28
class only applies on small screens and above, leaving potential overflow on extra small screens.- The fixed width might not be optimal across different screen sizes and username lengths.
Consider this more flexible approach:
- <p - className="text-sm text-gray-500 truncate sm:max-w-28" - title={user.username} - > - {user.username} - </p> + <p + className="text-sm text-gray-500 truncate max-w-[7rem] sm:max-w-[8rem] md:max-w-[10rem]" + title={user.username} + > + {user.username} + </p>This provides:
- Base truncation width for all screen sizes
- Progressive width increases for larger screens
- More space for longer usernames while maintaining layout
289-289
: Consider using the design system's destructive button variant.While the red background effectively communicates the destructive action, it's better to use the design system's built-in destructive variant for consistency.
- className="bg-red-500 text-white hover:bg-red-600" + variant="destructive"Benefits:
- Maintains consistency with the design system
- Automatically handles hover, focus, and active states
- Ensures the destructive styling stays in sync with design updates
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Patient/PatientDetailsTab/PatientUsers.tsx
(3 hunks)
🔇 Additional comments (1)
src/components/Patient/PatientDetailsTab/PatientUsers.tsx (1)
239-239
: LGTM! The empty state styling looks good.The styling classes provide appropriate visual hierarchy and spacing for the "no users assigned" message.
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit