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-2] #3716

Merged

Conversation

hustlernik
Copy link
Contributor

@hustlernik hustlernik commented Feb 21, 2025

What kind of change does this PR introduce?

Refactor CSS

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

Other information

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • Style
    • Updated styling references across multiple sections to a new fixed layout approach.
    • Revised CSS module imports to ensure a more uniform and consistent design.
    • Adjusted class names on modal components to better align with the updated styling framework.
    • Introduced new CSS variables and classes for enhanced styling capabilities and responsiveness.

Copy link
Contributor

coderabbitai bot commented Feb 21, 2025

Walkthrough

This pull request updates the CSS module import statements across multiple components by replacing references from app.module.css (or its relative paths) with app-fixed.module.css. The changes are confined to styling imports and minor class name modifications in one file, with no alterations to component logic, structure, or public interfaces.

Changes

File(s) Change Summary
src/components/UserPortal/PeopleCard/PeopleCard.tsx
src/components/UserPortal/UserSidebarOrg/UserSidebarOrg.tsx
src/screens/OrgList/OrganizationModal.tsx
src/screens/OrgPost/OrgPost.tsx
src/screens/PageNotFound/PageNotFound.tsx
Updated CSS module import from app.module.css to app-fixed.module.css.
src/screens/OrganizationActionItems/ItemDeleteModal.tsx
src/screens/OrganizationActionItems/ItemModal.tsx
src/screens/OrganizationActionItems/ItemUpdateStatusModal.tsx
src/screens/OrganizationActionItems/ItemViewModal.tsx
Updated relative CSS module import from ../../style/app.module.css to ../../style/app-fixed.module.css.
src/screens/OrganizationPeople/AddMember.tsx Updated CSS module import from app.module.css to app-fixed.module.css and changed modal CSS class names from createUserModalHeader and createUserActionBtns to createButton.
src/screens/UserPortal/People/People.tsx Updated relative CSS module import from ../../../style/app.module.css to ../../../style/app-fixed.module.css.
src/style/app-fixed.module.css Introduced numerous new CSS variables and classes, including the renaming of existing variables and the addition of media queries for responsive design.

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes

Poem

I'm a rabbit in the code, hopping through the night,
Switching styles with a twitch, making everything just right.
The old module's out, a new one comes in view,
My whiskers dance with joy for a layout shiny and new.
With a hop and a skip, these changes set the pace,
Carrots and code combined in a delightful race!
Happy hops to all, from me—a styling ace!


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

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 21, 2025
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 (3)
src/style/app-fixed.module.css (3)

218-224: Duplicate Variable Definition Notice
In this block, the variable --inputField-bg is defined twice (once as #ffffff on line 220 and then as #fff on line 223). Although both values are equivalent, consolidating these into a single definition would avoid any potential confusion and ensure consistency in overriding order.


675-689: .noOutline Class Enhancements
The new rules for .noOutline remove default focus outlines from inputs and textareas. While this creates a cleaner look, please verify that alternative focus indicators are provided elsewhere to preserve accessibility. The extensive use of !important should be reviewed to ensure it won’t complicate future style overrides.


1388-1699: Left Drawer & Responsive Animations Overhaul
A broad set of updates to the left drawer component—from its base styling (width, padding, background, and font-family) through its active/inactive states and responsive media queries—significantly improve the sidebar’s usability and visual appeal. The inclusion of keyframe animations (with appropriate Webkit prefixes) and adjustments for different screen sizes will be essential for a smooth dark mode transition. Please review these animations on various devices to ensure performance and accessibility remain optimal.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cb2262e and 8a76c2b.

📒 Files selected for processing (1)
  • src/style/app-fixed.module.css (13 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
src/style/app-fixed.module.css

[error] 801-801: Unexpected shorthand property padding after padding-bottom

(lint/suspicious/noShorthandPropertyOverrides)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (12)
src/style/app-fixed.module.css (12)

200-217: CSS Variable Renaming & Expansion
The variable renaming—from the ambiguous --chevronRightbtn to the more explicit --chevronRightbtn-bg—along with the introduction of new related variables (for left drawer backgrounds and active item states) improves semantic clarity and consistency in your theming.


225-227: New Input Field Modal & Shadow Variables
The introduction of --inputFieldModal-bg and --input-shadow-color fits well into the design system and will help maintain consistency in modal input field styling.


228-234: People Card Styling Variables Added
The new definitions for drop shadow and people card background/border variables enhance control over the people card component styling. This structured approach aids in maintainability.


235-247: Page Not Found & Create Button Variables
The update of page not found colors and the detailed set of variables for the create button (background, border, hover, and active states) ensure that these elements share a unified look. The explicit variable names make future theming (including dark mode support) easier to manage.


746-761: Input Field Styling Updates
The .inputField class now explicitly sets top and bottom margins, background color, and border, and its focus state includes a box shadow and transition. These changes create a consistent and modern input appearance. Consider if the widespread use of !important is necessary or if specificity can be improved instead.


774-787: Create Button Styling Refinement
The .createButton rules now leverage the newly defined CSS variables—with consistent use of !important—to control background, color, border, and box-shadow on hover and active states. This approach supports robust theming; just ensure that the forced overrides do not conflict with potential customizations for dark mode.


1073-1081: Profile Container Styling Updated
The updated .profileContainer now defines its border, padding, height, and background using the new variable --profileContainer-bg (with !important). This creates a clear, consistent container for profile elements. Verify that the forced override is necessary and that it integrates well with dark mode schemes.


1086-1092: Image Container Adjustments
The .imageContainer class now standardizes the dimensions and border-radius for profile images. This ensures that images remain uniformly circular and appropriately spaced.


1103-1119: Profile Text Styling Enhancements
The rules for .profileTextUserSidebarOrg .primaryText and .secondaryText now include properties to manage text overflow (using -webkit-line-clamp and related properties) and ensure proper font sizing. This improves text truncation and responsiveness. Just verify cross-browser support for these properties.


1128-1131: Chevron Button Background Update
The .chevronRightbtn class now uses the updated --chevronRightbtn-bg variable for its background. This small but important change enhances consistency with the new naming convention.


1144-1146: Reusable Text Ellipsis Inclusion
The use of @extend .reusable-text-ellipsis adds a DRY approach to text truncation styling. Ensure that the extended class is defined globally and works as expected in all browsers.


2701-2732: People Page Layout Improvements
The updated styles for .mainContainer_people, .people__header, and .people_card_header refine the layout for the People page. These changes help manage spacing, overflow, and alignment across varying viewport sizes.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.09%. Comparing base (b83973a) to head (52a1f71).
Report is 1 commits behind head on develop-postgres.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           develop-postgres    #3716      +/-   ##
====================================================
+ Coverage             86.08%   86.09%   +0.01%     
====================================================
  Files                   371      371              
  Lines                  9138     9138              
  Branches               1925     1925              
====================================================
+ Hits                   7866     7867       +1     
  Misses                  906      906              
+ Partials                366      365       -1     

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

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 21, 2025
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 (4)
src/style/app-fixed.module.css (4)

200-261: Review Custom CSS Variables – Ensure Consistency and Clarity

This block introduces a comprehensive set of custom properties for buttons, tabs, inputs, and other components. In particular, renaming the variable to --chevronRightbtn-bg improves clarity, and the new definitions for left drawer elements and create button states add flexibility. However, note the following points:

  • The variable --inputField-bg is defined twice (line 220 vs. line 223) with equivalent colors (#ffffff vs. #fff). Consider consolidating these to avoid potential confusion.
  • There is a naming inconsistency with --LeftDrawer-org-profileContainer-bg (capital “L”) compared to the other lowercase left drawer variables. Standardizing the casing will improve maintainability.

746-759: Verify Input Field Styling Consistency

The new rules for .inputField (including focus state styling with a subtle box shadow and transition) are straightforward and align with the design language presented by the custom properties. Just ensure that any duplicate definitions (as for its background color in the :root block) are resolved to maintain consistency.


1387-1689: Comprehensive Update to Left Drawer Styles

This section adds extensive styling for the left drawer component. The new .leftDrawer, .activeDrawer, and .inactiveDrawer classes define layout, transitions, and responsive behavior. Key notes:

  • The custom property --LeftDrawer-org-profileContainer-bg (with an uppercase “L”) should be standardized to match other left drawer variables.
  • Multiple media queries are applied to ensure responsiveness. Please verify that the scrollbar styles, padding, and widths render correctly across your target devices and browsers.

1798-2768: General Review of Extended Component Styles

The remainder of the file contains a broad set of style rules for various components—including modals, buttons, responsive layouts, and typography. Overall, the changes improve modularity and maintainability. Since the PR is in preparation for dark mode, please confirm that:

  • No conflicting hard-coded color values will hinder the later introduction of dark mode overrides.
  • The responsive media queries continue to provide a smooth user experience across devices.
  • Naming conventions remain consistent throughout the file.

It may be beneficial to establish a dedicated dark mode stylesheet or conditionally apply dark mode values via CSS variables in a future update.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8a76c2b and 52a1f71.

📒 Files selected for processing (1)
  • src/style/app-fixed.module.css (13 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (2)
src/style/app-fixed.module.css (2)

774-793: Ensure Consistent Button Interactions for .createButton

The styles for .createButton cover the default, hover, and active states with clear definitions using the new CSS variables. The use of !important ensures these styles take precedence; however, please verify that the contrast and visual feedback meet accessibility requirements for interactive elements.


1700-1797: Review Keyframe Animations for Drawer Transitions

Custom keyframe animations (e.g. goToLeftBigScreen, comeToRightBigScreen, closeDrawer, and openDrawer) have been introduced—with appropriate WebKit prefixes—to facilitate smooth drawer transitions. Ensure that these animations perform consistently across all target browsers and that the performance is acceptable on lower-end devices.

@hustlernik
Copy link
Contributor Author

@palisadoes Please check this out.

@palisadoes palisadoes merged commit b735fdb into PalisadoesFoundation:develop-postgres Feb 21, 2025
19 checks passed
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