-
Notifications
You must be signed in to change notification settings - Fork 344
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: dark mode issues on form preview #301
Conversation
WalkthroughThe update introduces a conditional styling feature to the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- client/components/open/forms/OpenFormField.vue (1 hunks)
Additional comments: 2
client/components/open/forms/OpenFormField.vue (2)
- 233-233: The addition of the
dark:bg-notion-dark-light
class for dark mode support within thegetFieldClasses
method is a targeted and effective way to ensure form fields are styled appropriately in dark mode. This change directly addresses the PR's objective to fix dark mode issues on form preview by ensuring that the form fields are visually distinct and appealing in both light and dark modes. The use of Tailwind CSS classes for conditional styling is consistent with modern front-end development practices.- 230-236: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-355]
Overall, the
OpenFormField.vue
component is well-structured, making extensive use of Vue's composition API and computed properties to dynamically render form fields based on their type and state. The addition of dark mode support is seamlessly integrated into the existing logic without introducing any apparent issues or conflicts.However, it's crucial to ensure that the new class addition does not inadvertently affect the layout or styling of form fields in scenarios not related to dark mode. It would be beneficial to conduct thorough testing across different browsers and devices to verify that the form fields maintain their intended appearance and functionality in both light and dark modes.
Additionally, consider documenting the rationale behind specific class choices (e.g.,
dark:bg-notion-dark-light
) within the code or project documentation to aid future development and maintenance efforts.
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.
Hey @madassdev you forgot the 2nd part of this issue (file uploads)
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- client/components/open/forms/OpenFormField.vue (1 hunks)
- client/tailwind.config.js (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- client/components/open/forms/OpenFormField.vue
Additional comments: 4
client/tailwind.config.js (4)
- 15-15: The regex pattern for the
safelist
configuration is correctly formatted. However, ensure that the regex pattern is comprehensive and matches all intended classes. This is crucial for avoiding unintended side effects where certain classes might not get included in the final build due to Tailwind's purge mechanism.- 17-18: Adding
'dark:hover:bg-notion-dark-light'
to thesafelist
is a good approach to ensure that this class is not purged by Tailwind CSS in production builds, especially since it's conditionally applied based on the dark mode and hover state. This change directly supports the PR's objective of fixing dark mode issues on form preview.- 30-31: The reformatting of the
infinite-scroll
keyframes for better readability is approved. However, ensure that this change has been tested across all browsers where the application is expected to run, as different browsers may have varying levels of support for CSS animations and keyframes.- 88-88: The modification in the
plugin
function to improve code style by adding spaces within the function declaration is a minor stylistic change that aligns with JavaScript's conventional coding standards. However, consistency across the entire file and project should be maintained. If this coding style is adopted here, ensure it is consistently applied throughout the project to maintain readability and code hygiene.
* fix: dark mode issues on form preview * Fix darkmode issues --------- Co-authored-by: Julien Nahum <julien@nahum.net>
Fix resize for all forms crisp migration (#302) Co-authored-by: Julien Nahum <julien@nahum.net> fix console error (#304) fix: dark mode issues on form preview (#301) * fix: dark mode issues on form preview * Fix darkmode issues --------- Co-authored-by: Julien Nahum <julien@nahum.net> Remove useless iframe attributes
Summary by CodeRabbit