-
Notifications
You must be signed in to change notification settings - Fork 531
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
Set the primary background color on the weekday when selected #10014
Set the primary background color on the weekday when selected #10014
Conversation
WalkthroughThe pull request modifies several UI components, specifically changing the visual styles of buttons and input elements. In the Changes
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. |
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.
can we make the borders of other inputs (such as Session name, time inputs, etc.) also consistent with ones in the session type select?
cc: @vinutv
@rithviknishad Did you mean the border should remain consistent after selection, or should a background be applied to all of them after selection? |
no, observe the difference between the border of "Session Type" drop-down and "Session Title" / "Start Time" / "End Time". The shade is different right? Let's make it consistent. |
@rithviknishad Is it correct? |
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/ui/input.tsx (1)
Line range hint
5-22
: Consider adding size variants for better reusability.Since this is a reusable input component, consider enhancing it with:
- Size variants (sm, md, lg) to avoid hard-coded heights
- Configurable border and focus colors through props
Example implementation:
type InputSize = 'sm' | 'md' | 'lg'; type InputProps = React.ComponentProps<"input"> & { size?: InputSize; borderColor?: string; focusColor?: string; }; const sizeClasses: Record<InputSize, string> = { sm: 'h-8', md: 'h-9', lg: 'h-10' }; const Input = React.forwardRef<HTMLInputElement, InputProps>( ({ className, type, size = 'md', borderColor, focusColor, ...props }, ref) => { return ( <input type={type} className={cn( "flex w-full items-center justify-between whitespace-nowrap rounded-md border bg-white px-3 py-2 text-sm shadow-sm transition-colors", sizeClasses[size], borderColor || "border-gray-400/75", focusColor ? `focus:border-${focusColor}` : "focus:border-primary-500", // ... rest of the classes className, )} ref={ref} {...props} /> ); } );
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/ui/input.tsx
(1 hunks)src/components/ui/textarea.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/components/ui/textarea.tsx
🔇 Additional comments (1)
src/components/ui/input.tsx (1)
11-11
: LGTM! The styling changes align with the PR objectives.The updated styling improves visual consistency by:
- Using a darker border color (gray-400/75) to match other form elements
- Adding clear focus states with primary colors
- Maintaining dark mode support
Please verify:
- The border opacity (75%) provides sufficient contrast for accessibility
- The fixed height (h-9) maintains layout consistency across all usage contexts
- The focus ring color (primary-900) is visible enough against all backgrounds
Run this script to check for potential layout issues with the new fixed height:
✅ Verification successful
The fixed height (h-9) implementation is safe and consistent.
Our codebase analysis shows no conflicting height customizations or wrapper components that would be affected by the standardized height. You can proceed with confidence regarding the layout consistency.
Please still verify:
- The border opacity (75%) provides sufficient contrast for accessibility
- The focus ring color (primary-900) is visible enough against all backgrounds
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for existing height classes on Input components that might conflict rg -A 2 '<Input.*className=' | grep -E 'h-[0-9]+' # Search for custom height styles that might be affected rg 'input.*height:' --type cssLength of output: 267
Script:
#!/bin/bash # Search for Input components with inline style attributes rg -B1 -A2 '<Input.*style=' # Search for components wrapping Input with style/className that might affect height ast-grep --pattern 'const $_ = $$$<Input$$$' -f tsxLength of output: 261
Script:
#!/bin/bash # Search for Input components with inline style attributes rg -B1 -A2 '<Input.*style=' # Search for styled Input components rg "styled\(Input\)" # Look for form components that might wrap Input rg -B2 -A2 '<(Form|FormField).*>.*\s*<Input' # Search for Input wrapper components with correct ast-grep syntax ast-grep --pattern 'const $_ = () => { $$$ return ( $$$ <Input $$$ ) }'Length of output: 191
@NikhilA8606 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! 🙌 |
UI changed
Initially : There is only a narrow border is showing while selecting a day in weekday in create new session
Changes : Set a fix primary bg colour on the selection of week day
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit