-
Notifications
You must be signed in to change notification settings - Fork 516
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
Facility Id in User Profile for Nav User #9857
base: develop
Are you sure you want to change the base?
Facility Id in User Profile for Nav User #9857
Conversation
WalkthroughThe pull request modifies the rendering logic of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (3)
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.
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 (1)
src/components/Users/UserHome.tsx (1)
126-126
: Consider using URL path joining utility.While the current implementation works correctly, consider using a URL path joining utility to handle potential edge cases with slashes. This would make the code more robust against future changes.
-href={`${userUrl}/${p.toLocaleLowerCase()}`} +import { joinPaths } from "@/Utils/url"; +href={joinPaths(userUrl, p.toLowerCase())}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/Users/UserHome.tsx
(2 hunks)src/components/ui/sidebar/app-sidebar.tsx
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/ui/sidebar/app-sidebar.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: cypress-run (1)
- GitHub Check: OSSAR-Scan
🔇 Additional comments (2)
src/components/Users/UserHome.tsx (2)
87-89
: LGTM! Clean URL construction refactoring.The introduction of the
userUrl
variable improves code readability and maintainability while correctly handling both facility-specific and general user profile URLs.
87-89
: Verify URL pattern consistency across the application.Let's ensure the new URL pattern is consistently used across related components.
Also applies to: 126-126
✅ Verification successful
URL pattern implementation is correct and consistent
The conditional URL pattern is properly implemented and consistently used across the application for user profiles, supporting both facility-scoped and global contexts.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for similar URL patterns in the codebase echo "Searching for facility user URL patterns..." rg -A 2 "facility/[^/]+/users/[^/]+" --type ts --type tsx echo "Searching for FacilityNavUser usage..." ast-grep --pattern 'FacilityNavUser $props { $$$ }'Length of output: 327
Script:
#!/bin/bash # Search for URL patterns with explicit file types echo "Searching for facility and user URL patterns..." rg -t typescript -t typescriptreact "(/facility/|/users/)" -B1 -A1 echo "Searching for FacilityNavUser component..." ast-grep --pattern 'import { $$ FacilityNavUser $$ } from "$_"' echo "Searching for FacilityNavUser usage..." ast-grep --pattern '<FacilityNavUser $$$>'Length of output: 501
Script:
#!/bin/bash # Find relevant TypeScript files first echo "Finding TypeScript files..." fd -e ts -e tsx echo "Searching for URL patterns..." rg "(/facility/|/users/)" -g "*.{ts,tsx}" -B2 -A2 echo "Finding components with 'User' in the name..." fd -e tsx -e ts | grep -i "user"Length of output: 70881
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
Improvements