-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat/Improved Button Styles for Better Readability in both light & dark mode #426
feat/Improved Button Styles for Better Readability in both light & dark mode #426
Conversation
@CoderFleet is attempting to deploy a commit to the bunty's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes in the Changes
Assessment against linked issues
Possibly related PRs
📜 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 (
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
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 and nitpick comments (1)
frontend/src/components/Pages/Event.jsx (1)
279-280
: Improve comment clarity and formatting.The inline comment could be more concise and follow JSX commenting conventions.
- {/* Added Appropriate colors to improve readability - & Changed Hover Styles too so that they adjust to both dark and light mode both */} + {/* Enhanced button styling for better readability in light/dark modes */}
<button className="btn btn-primary bg-[#C3E0DC] p-4 rounded-xl text-md font-medium mt-4 hover:bg-[#FFF9B1]"> | ||
{/* Added Appropriate colors to improve readability | ||
& Changed Hover Styles too so that they adjust to both dark and light mode both */} | ||
<button className="btn btn-primary bg-[#85C1B9] text-white p-4 rounded-xl text-md font-medium mt-4 hover:bg-[#F05365] hover:text-white"> |
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.
💡 Codebase verification
🛠️ Refactor suggestion
Dark mode support should be implemented for consistency
Based on the search results, the codebase extensively uses dark mode classes throughout various components, including proper dark mode variants for backgrounds, text colors, and hover states. However, this specific button in Event.jsx
lacks dark mode support, breaking the application's design consistency.
- The button at
frontend/src/components/Pages/Event.jsx:281
should include dark mode variants to match the dark theme implementation found across other components - The parent container already supports dark mode:
<div id="event" className="w-full h-fit bg-amber-100 dark:bg-black dark:text-white md:overflow-hidden ">
The suggested changes in the review comment are valid and align with the existing dark mode implementation pattern in the codebase.
🔗 Analysis chain
Verify color contrast ratios and add dark mode support.
While the new colors improve visibility, there are some concerns:
- The current implementation uses the same colors for both light and dark modes, which might not be optimal for all scenarios.
- Color contrast ratios should be verified against WCAG standards.
Consider implementing proper dark mode support:
- <button className="btn btn-primary bg-[#85C1B9] text-white p-4 rounded-xl text-md font-medium mt-4 hover:bg-[#F05365] hover:text-white">
+ <button className="btn btn-primary bg-[#85C1B9] dark:bg-[#64958F] text-white p-4 rounded-xl text-md font-medium mt-4 hover:bg-[#F05365] dark:hover:bg-[#D64355] hover:text-white">
This change:
- Adds a darker teal variant for dark mode
- Adjusts hover color for better contrast in dark mode
- Maintains the same visual hierarchy across themes
Consider extracting these button styles into a reusable Tailwind component or CSS class to maintain consistency across the application. This would also make it easier to update the styling in the future.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify if dark mode classes are used elsewhere in the codebase
rg "dark:" frontend/
Length of output: 14588
@CoderFleet red color is not match with the UI |
@RamakrushnaBiswal sorry, for that... Is there any specific color choice do you have in mind |
just swap the text color @CoderFleet |
@RamakrushnaBiswal Sorry for the late commit...I have made the changes and updated the PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Enhance Text Readability in "Book your Slot" Button with Tailwind Classes for Light/Dark Mode Compatibility
Description
Fixes #417
This PR addresses the readability of the "Book your Slot" button in the event page, specifically within the "Events" section. Using Tailwind CSS classes, I refined the button's styling to ensure optimal contrast and visual coherence in both light and dark modes. The revised styling aligns with the UI theme, enhancing user experience across themes.
Changes Made
Updates
Screenshots
Light Mode:
Dark Mode:
Summary by CodeRabbit