Skip to content
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

NoMongo: Fix Stylesheet in Anticipation of Dark Mode [PR-4] #3740

Merged

Conversation

hustlernik
Copy link
Contributor

@hustlernik hustlernik commented Feb 23, 2025

What kind of change does this PR introduce?

CSS Refactor

Issue Number:

Fixes #3296

Does this PR introduce a breaking change?

No

Checklist

CodeRabbit AI Review

  • I have reviewed and addressed all critical issues flagged by CodeRabbit AI
  • I have implemented or provided justification for each non-critical suggestion
  • I have documented my reasoning in the PR comments where CodeRabbit AI suggestions were not implemented

Test Coverage

  • I have written tests for all new changes/features
  • I have verified that test coverage meets or exceeds 95%
  • I have run the test suite locally and all tests pass

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • Style
    • Updated the app’s visual presentation across multiple screens, including community, event, volunteer, and user interfaces.
    • Centralized styling by shifting to a refined stylesheet with enhanced CSS variables and class definitions for consistency and improved responsiveness.

Copy link
Contributor

coderabbitai bot commented Feb 23, 2025

Walkthrough

The changes update the CSS module import paths for multiple components. Nearly all component files now reference app-fixed.module.css instead of app.module.css. No business logic or control-flow modifications were made. Additionally, significant enhancements were introduced to the app-fixed.module.css file, including new CSS custom properties and classes to uniformly manage colors, backgrounds, borders, and responsive design elements across the application.

Changes

File(s) Change Summary
src/screens/BlockUser/BlockUser.tsx
src/screens/CommunityProfile/CommunityProfile.tsx
src/screens/EventManagement/EventManagement.tsx
src/screens/EventVolunteers/VolunteerContainer.tsx
src/screens/EventVolunteers/VolunteerGroups/*.tsx
src/screens/EventVolunteers/Volunteers/*.tsx
src/screens/ForgotPassword/ForgotPassword.tsx
src/screens/FundCampaignPledge/*.tsx
src/screens/UserPortal/{Chat, Donate, Events, Organizations, Pledges, Posts, Settings, UserScreen, Volunteer/*}
src/screens/Users/Users.tsx
Updated import statements for CSS from app.module.css to app-fixed.module.css (with adjusted relative paths) without altering component functionality.
src/screens/Leaderboard/Leaderboard.tsx Updated import statement from app.module.css to app-fixed.module.css, maintaining existing behavior.
src/style/app-fixed.module.css Added numerous CSS custom property declarations and new classes, enhancing styling consistency, responsiveness, and overall design management.

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Poem

I'm a funky bunny, hopping through code so bright,
With styles all fixed and colors taking flight.
From old CSS trails to a fresh, fixed way,
My whiskers twitch with joy at every display.
A rabbit's cheer for UI so neat—hoppy updates make my day!


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (6)
src/style/app-fixed.module.css (6)

331-337: New CSS Variables for Pledge and Popup Styling
The introduction of custom properties such as --pledgeContainer-bg, --popup-border, --popup-bg, --popup-color, and --popup-box-shadow is a solid step toward modularizing theme definitions. These variables will make it easier to adjust popup and pledge container appearances (including future dark mode adjustments).


338-341: Additional Background and Container Variables
Adding --colorlight-bg alongside --containerHeight-bg and an initial definition for --cardHeader-border improves clarity. However, note that --cardHeader-border is defined again later (line 406) with a different value. Please verify the intended final value to avoid unintended overrides.


343-355: Consolidation of Sidebar Collapse and Opendrawer Variables
This block defines several variables related to sidebar behavior and opendrawer styling. The overall approach is clear and aligns with our goal of consistent theming. One minor issue: the variable --collapseSidebarButton-bg is defined twice (once at line 350 and again at line 355) with the same value. Consolidating this definition would help avoid redundancy.


369-389: Outline Button Variable Duplication and Consistency
There are two blocks of definitions for outline button variables (from lines 369–377 and then lines 378–389). This repetition may lead to confusion and maintenance challenges. Please review whether all duplicate definitions are intentional or if they can be consolidated to ensure consistency.


400-407: General Container and Border Variables
The new variables for container background (--mainContainer50-bg), box styling (--box-bg and --box-border), and datebox borders are useful additions. As mentioned earlier, the conflicting values for --cardHeader-border (initially set to #e9ecef then later to #f6f6f6) should be verified to ensure consistency in component borders.


2104-4791: Overall CSS Refactor and Dark Mode Preparation
This very extensive refactor—spanning the definition of numerous CSS custom properties to a reorganization of global styles—is a positive step toward better maintenance and dark mode readiness. The new variables create a unified palette across components and simplify future theme adjustments. One suggestion for further improvement: consider adding inline documentation or grouping the dark mode–specific overrides (perhaps via a media query or separate class/toggle) so that future modifications for an actual dark theme can be applied in a centralized manner. Also, be sure to address duplicate and conflicting variable definitions to avoid potential unforeseen styling issues.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6067ff and 91df93f.

📒 Files selected for processing (32)
  • src/screens/BlockUser/BlockUser.tsx (1 hunks)
  • src/screens/CommunityProfile/CommunityProfile.tsx (1 hunks)
  • src/screens/EventManagement/EventManagement.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerContainer.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupDeleteModal.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupModal.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupViewModal.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx (1 hunks)
  • src/screens/EventVolunteers/Volunteers/VolunteerCreateModal.tsx (1 hunks)
  • src/screens/EventVolunteers/Volunteers/VolunteerDeleteModal.tsx (1 hunks)
  • src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx (1 hunks)
  • src/screens/ForgotPassword/ForgotPassword.tsx (1 hunks)
  • src/screens/FundCampaignPledge/FundCampaignPledge.tsx (1 hunks)
  • src/screens/FundCampaignPledge/PledgeDeleteModal.tsx (1 hunks)
  • src/screens/FundCampaignPledge/PledgeModal.tsx (1 hunks)
  • src/screens/Leaderboard/Leaderboard.tsx (1 hunks)
  • src/screens/UserPortal/Chat/Chat.tsx (1 hunks)
  • src/screens/UserPortal/Donate/Donate.tsx (1 hunks)
  • src/screens/UserPortal/Events/Events.tsx (1 hunks)
  • src/screens/UserPortal/Organizations/Organizations.tsx (1 hunks)
  • src/screens/UserPortal/Pledges/Pledges.tsx (1 hunks)
  • src/screens/UserPortal/Posts/Posts.tsx (1 hunks)
  • src/screens/UserPortal/Settings/Settings.tsx (1 hunks)
  • src/screens/UserPortal/UserScreen/UserScreen.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Actions/Actions.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Groups/GroupModal.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Groups/Groups.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Invitations/Invitations.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/UpcomingEvents/UpcomingEvents.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/VolunteerManagement.tsx (1 hunks)
  • src/screens/Users/Users.tsx (1 hunks)
  • src/style/app-fixed.module.css (4 hunks)
✅ Files skipped from review due to trivial changes (31)
  • src/screens/CommunityProfile/CommunityProfile.tsx
  • src/screens/UserPortal/Settings/Settings.tsx
  • src/screens/UserPortal/Organizations/Organizations.tsx
  • src/screens/Leaderboard/Leaderboard.tsx
  • src/screens/UserPortal/Volunteer/Invitations/Invitations.tsx
  • src/screens/FundCampaignPledge/PledgeDeleteModal.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupDeleteModal.tsx
  • src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx
  • src/screens/UserPortal/Volunteer/VolunteerManagement.tsx
  • src/screens/UserPortal/Volunteer/Groups/GroupModal.tsx
  • src/screens/UserPortal/Volunteer/UpcomingEvents/UpcomingEvents.tsx
  • src/screens/UserPortal/Volunteer/Groups/Groups.tsx
  • src/screens/EventVolunteers/VolunteerContainer.tsx
  • src/screens/ForgotPassword/ForgotPassword.tsx
  • src/screens/UserPortal/Events/Events.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupModal.tsx
  • src/screens/UserPortal/Volunteer/Actions/Actions.tsx
  • src/screens/EventVolunteers/Volunteers/VolunteerCreateModal.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupViewModal.tsx
  • src/screens/UserPortal/Posts/Posts.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx
  • src/screens/UserPortal/Donate/Donate.tsx
  • src/screens/Users/Users.tsx
  • src/screens/UserPortal/Pledges/Pledges.tsx
  • src/screens/FundCampaignPledge/PledgeModal.tsx
  • src/screens/FundCampaignPledge/FundCampaignPledge.tsx
  • src/screens/EventVolunteers/Volunteers/VolunteerDeleteModal.tsx
  • src/screens/UserPortal/Chat/Chat.tsx
  • src/screens/UserPortal/UserScreen/UserScreen.tsx
  • src/screens/BlockUser/BlockUser.tsx
  • src/screens/EventManagement/EventManagement.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (4)
src/style/app-fixed.module.css (4)

356-363: Status and Active Color Customizations
Defining variables such as --active-color, --active-border-color, --pending-color, and --pending-border-color adds clarity to status styling and lays a good foundation for dark mode adjustments later on.


364-368: Toggle Button Styling Setup
The new custom properties for the toggle button (--toggleBtn-bg, --toggleBtn-color, --toggleBtn-border, --toggleBtn-color-hover, and --toggleBtn-border-hover) are straightforward and should help ensure consistent button states across components.


2106-2116: New Card Component Styling
The newly introduced .card and .cardHeader classes use the updated custom properties effectively. Using width: fit-content; for .card appears appropriate in contexts where the card should shrink to its content; just ensure this works well with responsive layouts.


2118-2127: Form Label Styling Consistency
The .formLabel class now utilizes --formLabel-color and appears streamlined to work with the new theme variables. This change supports a uniform look across form elements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/style/app-fixed.module.css (2)

330-343: New CSS Variable Declarations for Component Styling and Dark Mode Adaptability
A fresh group of custom properties (e.g. --pledgeContainer-bg, --popup-border, --popup-bg, --popup-color, --popup-box-shadow, --colorlight-bg, --containerHeight-bg, and --cardHeader-border) has been added. These variables will be instrumental for tailoring styles in dark mode as well as standard themes. Please ensure that:

  • The chosen color values (such as the semi-transparent #31bb6b33 for the pledge container) provide sufficient contrast under both light and dark mode scenarios.
  • The naming conventions remain consistent with existing variables across the codebase.
  • Documentation is updated so that future developers know how to override these for dark mode.

2105-2116: Addition of Reusable Card Components
A new generic .card class (using width: fit-content) along with a corresponding .cardHeader class (which applies padding, a border-bottom using the new --cardHeader-border variable, and flex layout properties) has been introduced. These styles should help promote consistency across component cards that may appear in dark mode. Consider:

  • Verifying that the use of fit-content is supported in your target browsers.
  • Optionally setting a responsive font-size or additional spacing adjustments inside .cardHeader .cardTitle if needed for better scalability.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91df93f and 22f3b67.

📒 Files selected for processing (2)
  • src/screens/Leaderboard/Leaderboard.tsx (1 hunks)
  • src/style/app-fixed.module.css (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/screens/Leaderboard/Leaderboard.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application

Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.05%. Comparing base (f6067ff) to head (22f3b67).

Additional details and impacted files
@@                Coverage Diff                @@
##           develop-postgres    #3740   +/-   ##
=================================================
  Coverage             86.05%   86.05%           
=================================================
  Files                   371      371           
  Lines                  9139     9139           
  Branches               1925     1925           
=================================================
  Hits                   7865     7865           
  Misses                  909      909           
  Partials                365      365           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hustlernik
Copy link
Contributor Author

@palisadoes Please take a look.

@palisadoes palisadoes merged commit 3facd9f into PalisadoesFoundation:develop-postgres Feb 23, 2025
19 checks passed
@palisadoes
Copy link
Contributor

Good work. Only about 100 files left to go.

@coderabbitai coderabbitai bot mentioned this pull request Mar 5, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants