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

Refactor CSS Structure for EventVolunteers: Improved Maintainability and UI Consistency #2651

Open
wants to merge 3 commits into
base: develop-postgres
Choose a base branch
from

Conversation

gurramkarthiknetha
Copy link

@gurramkarthiknetha gurramkarthiknetha commented Dec 13, 2024

What kind of change does this PR introduce?

Feature/Refactoring

Issue Number:

Fixes #2505

Did you add tests for your changes?

Yes

Snapshots/Videos:

N/A

If relevant, did you update the documentation?

No

Summary

This PR refactors the CSS structure for the EventVolunteers and its related components. The changes involve merging all CSS files from the subdirectory and related components into the global CSS file. After the merge, the old CSS files were deleted, and the components were updated to reference the global CSS. This improves maintainability and adheres to the updated design patterns.

Does this PR introduce a breaking change?

No, these changes only refactor the existing CSS structure.

Other information

Testing was completed to ensure no UI regressions. All screens were verified for consistency with the updated global CSS styles.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced styling for various components, including buttons, containers, and modals.
    • Improved search functionality with debounced input for better performance.
  • Bug Fixes

    • Adjusted styling for error icons and input fields.
  • Documentation

    • Updated CSS styles to reflect new class definitions and improvements.
  • Chores

    • Reorganized CSS import paths for better structure and maintainability.
  • Style

    • Removed outdated styles from the Event Volunteers screen and introduced new styles for improved UI presentation.
    • Added new classes for dropdowns and modals, enhancing interactivity and visual presentation.

Copy link

coderabbitai bot commented Dec 13, 2024

Walkthrough

The changes in this pull request involve the complete removal of the EventVolunteers.module.css file, which contained various CSS classes used for styling components within the Event Volunteers screen. Additionally, the import paths for styles in several components have been updated to reference a new global CSS file located at src/style/app.module.css. This restructuring aims to streamline the CSS organization and adhere to a new design pattern.

Changes

File Change Summary
src/screens/EventVolunteers/EventVolunteers.module.css Removed all CSS classes and the file itself.
src/screens/EventVolunteers/Requests/Requests.tsx Updated import path for styles to ../../../style/app.module.css.
src/screens/EventVolunteers/VolunteerContainer.tsx Updated import path for styles and renamed component to VolunteerContainer.
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupDeleteModal.tsx Updated import path for styles.
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupModal.tsx Updated import path for styles.
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupViewModal.tsx Updated import path for styles.
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx Updated import path for styles and enhanced modal state handling.
src/screens/EventVolunteers/Volunteers/VolunteerCreateModal.tsx Updated import path for styles.
src/screens/EventVolunteers/Volunteers/VolunteerDeleteModal.tsx Updated import path for styles.
src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx Updated import path for styles.
src/screens/EventVolunteers/Volunteers/Volunteers.tsx Updated import path for styles.
src/screens/UserPortal/Volunteer/Groups/GroupModal.tsx Updated import path for styles.
src/screens/UserPortal/Volunteer/Groups/Groups.tsx Updated import path for styles.
src/style/app.module.css Added multiple new CSS classes for various components.

Assessment against linked issues

Objective Addressed Explanation
Refactor CSS files in src/screens/EventVolunteers (2505)
Merge CSS files into a global CSS file and delete the old files (2505) All relevant CSS classes have been removed and merged into the global file.

Possibly related issues

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes
  • pranshugupta54
  • gautam-divyanshu

🐇 "In the garden where styles once bloomed,
The modal and avatar have been entombed.
With CSS lightened, we hop with glee,
A cleaner design for all to see!
Let colors unite, and clarity reign,
In the world of Talawa, joy will remain!" 🌼


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. (Experiment)
  • @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 Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.81%. Comparing base (9b5bd3e) to head (ac0f749).
Report is 8 commits behind head on develop-postgres.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           develop-postgres    #2651       +/-   ##
=====================================================
- Coverage             95.82%   83.81%   -12.01%     
=====================================================
  Files                   295      312       +17     
  Lines                  7037     8118     +1081     
  Branches               1520     1773      +253     
=====================================================
+ Hits                   6743     6804       +61     
- Misses                   98     1172     +1074     
+ Partials                196      142       -54     

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

Copy link

@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

🧹 Outside diff range and nitpick comments (12)
src/screens/EventVolunteers/VolunteerContainer.tsx (2)

Line range hint 18-18: Component name should follow React naming conventions

React components should use PascalCase naming convention. Rename the function from volunteerContainer to VolunteerContainer to align with React best practices.

-function volunteerContainer(): JSX.Element {
+function VolunteerContainer(): JSX.Element {

Line range hint 8-11: Consider extracting radio button options to a constant

The radio button options for individual/group/requests could be extracted to a constant array to improve maintainability and reusability.

+const VOLUNTEER_TYPES = [
+  { id: 'individual', icon: HiUser, label: 'individuals' },
+  { id: 'group', icon: HiUserGroup, label: 'groups' },
+  { id: 'requests', icon: FaRegFile, label: 'requests' }
+] as const;
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupModal.tsx (2)

Line range hint 171-186: Consider using a form validation library

The form validation is currently handled manually. Consider using a form validation library like Formik or React Hook Form for more robust form handling and validation.


Line range hint 187-195: Improve error handling specificity

The catch block currently displays the raw error message. Consider handling specific error types and providing user-friendly error messages.

 } catch (error: unknown) {
-  toast.error((error as Error).message);
+  if (error instanceof Error) {
+    if (error.message.includes('duplicate')) {
+      toast.error(t('groupNameExists'));
+    } else {
+      toast.error(t('errorCreatingGroup'));
+    }
+  }
 }
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx (2)

Line range hint 27-31: Consider using a reducer for modal state management

The current modal state management using multiple useState hooks could be simplified using useReducer for better state management and maintainability.

+type ModalAction = 
+  | { type: 'OPEN_MODAL'; modalType: ModalState }
+  | { type: 'CLOSE_MODAL'; modalType: ModalState };

+function modalReducer(state: Record<ModalState, boolean>, action: ModalAction) {
+  switch (action.type) {
+    case 'OPEN_MODAL':
+      return { ...state, [action.modalType]: true };
+    case 'CLOSE_MODAL':
+      return { ...state, [action.modalType]: false };
+    default:
+      return state;
+  }
+}

Line range hint 119-121: Consider extracting DataGrid columns configuration

The columns configuration is quite large and could be moved to a separate file to improve code organization and maintainability.

src/screens/EventVolunteers/Volunteers/Volunteers.tsx (2)

Line range hint 694-713: Consider enhancing error handling for volunteer data.

While the DataGrid implementation is solid, consider adding error boundaries or fallback UI for cases where volunteer data might be malformed.

 <DataGrid
   disableColumnMenu
   columnBufferPx={7}
   hideFooter={true}
   getRowId={(row) => row._id}
+  error={error}
+  components={{
+    ErrorOverlay: () => (
+      <Stack height="100%" alignItems="center" justifyContent="center">
+        {t('errorLoadingVolunteers')}
+      </Stack>
+    ),
+    ...slots
+  }}
   slots={{
     noRowsOverlay: () => (
       <Stack height="100%" alignItems="center" justifyContent="center">
         {t('noVolunteers')}
       </Stack>
     ),
   }}

Line range hint 776-789: Consider simplifying modal state management.

The current implementation uses separate boolean flags for each modal. Consider using a single state variable with the ModalState enum for better state management.

-const [modalState, setModalState] = useState<{
-  [key in ModalState]: boolean;
-}>({
-  [ModalState.ADD]: false,
-  [ModalState.DELETE]: false,
-  [ModalState.VIEW]: false,
-});
+const [activeModal, setActiveModal] = useState<ModalState | null>(null);

-const openModal = (modal: ModalState): void => {
-  setModalState((prevState) => ({ ...prevState, [modal]: true }));
+const openModal = (modal: ModalState): void => {
+  setActiveModal(modal);
};

-const closeModal = (modal: ModalState): void => {
-  setModalState((prevState) => ({ ...prevState, [modal]: false }));
+const closeModal = (): void => {
+  setActiveModal(null);
};
src/style/app.module.css (3)

738-744: Consider using CSS variables for consistent colors.

The dropdown styles use hardcoded color values. Consider using CSS variables for better maintainability and consistency.

 .dropdown {
   background-color: white;
-  border: 1px solid #31bb6b;
+  border: 1px solid var(--primary-color);
   position: relative;
   display: inline-block;
-  color: #31bb6b;
+  color: var(--primary-color);
 }

766-774: Consolidate status-related colors into CSS variables.

The active and pending status colors are hardcoded. Consider using CSS variables for better maintainability.

 .active {
-  background-color: #31bb6a50 !important;
+  background-color: var(--status-active-bg) !important;
 }

 .pending {
-  background-color: #ffd76950 !important;
-  color: #bb952bd0 !important;
-  border-color: #bb952bd0 !important;
+  background-color: var(--status-pending-bg) !important;
+  color: var(--status-pending-color) !important;
+  border-color: var(--status-pending-border) !important;
 }

818-821: Consider using CSS Grid for modal table layout.

The modal table uses fixed height and overflow. Consider using CSS Grid for a more flexible and responsive layout.

 .modalTable {
-  max-height: 220px;
-  overflow-y: auto;
+  display: grid;
+  grid-template-rows: auto minmax(0, 220px);
+  overflow-y: auto;
 }
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupViewModal.tsx (1)

Line range hint 41-196: Consider architectural improvements for better maintainability.

While not directly related to the CSS changes, consider these improvements:

  1. The component mixes Material-UI and React-Bootstrap components, which could lead to:

    • Inconsistent styling and behavior
    • Increased bundle size
    • Maintenance complexity
  2. Consider enhancing keyboard navigation by:

    • Adding role="dialog"
    • Implementing focus trap
    • Adding escape key handler

Would you like me to provide a code example implementing these improvements?

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ac0f749 and b0df665.

📒 Files selected for processing (14)
  • src/screens/EventVolunteers/EventVolunteers.module.css (0 hunks)
  • src/screens/EventVolunteers/Requests/Requests.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/EventVolunteers/Volunteers/Volunteers.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Groups/GroupModal.tsx (1 hunks)
  • src/screens/UserPortal/Volunteer/Groups/Groups.tsx (1 hunks)
  • src/style/app.module.css (1 hunks)
💤 Files with no reviewable changes (1)
  • src/screens/EventVolunteers/EventVolunteers.module.css
✅ Files skipped from review due to trivial changes (7)
  • src/screens/EventVolunteers/Volunteers/VolunteerCreateModal.tsx
  • src/screens/EventVolunteers/Volunteers/VolunteerDeleteModal.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupDeleteModal.tsx
  • src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx
  • src/screens/UserPortal/Volunteer/Groups/GroupModal.tsx
  • src/screens/EventVolunteers/Requests/Requests.tsx
  • src/screens/UserPortal/Volunteer/Groups/Groups.tsx
🔇 Additional comments (2)
src/screens/EventVolunteers/Volunteers/Volunteers.tsx (1)

23-23: LGTM: Import path updated correctly.

The import statement has been properly updated to reference the consolidated global CSS file, aligning with the PR's objective of CSS restructuring.

src/screens/EventVolunteers/VolunteerGroups/VolunteerGroupViewModal.tsx (1)

3-3: Verify CSS classes in the new global stylesheet.

The import path change aligns with the PR objective of consolidating CSS files. However, we should verify that all required CSS classes are properly transferred to the global stylesheet.

Let's verify the CSS classes used in this component:

✅ Verification successful

CSS import path change is safe and all required classes are present

The verification confirms that all CSS classes used in the component are properly defined in the global stylesheet (src/style/app.module.css). Specifically:

  • .titlemodal, .modalCloseBtn, .noOutline, .TableImage, .avatarContainer, .imageContainer, and .modalTable are all present in the global CSS file
  • These classes are consistently used across multiple components, indicating proper shared styling
  • The only missing class volunteerCreateModal is actually used in this component and two other volunteer-related modals, suggesting it's a deliberate shared modal style
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify CSS classes exist in the global CSS file and check for potential conflicts

# Check if all required CSS classes exist in the global CSS file
echo "Checking for required CSS classes in global CSS file..."
REQUIRED_CLASSES=(
  "volunteerCreateModal"
  "titlemodal"
  "modalCloseBtn"
  "noOutline"
  "TableImage"
  "avatarContainer"
  "imageContainer"
  "modalTable"
)

for class in "${REQUIRED_CLASSES[@]}"; do
  echo "Checking for .$class..."
  rg "\\.$class\\s*{" "src/style/app.module.css"
done

# Check for potential naming conflicts across components
echo -e "\nChecking for potential CSS class naming conflicts..."
for class in "${REQUIRED_CLASSES[@]}"; do
  echo "Checking usage of .$class across components..."
  rg "className=\{.*$class.*\}" --type ts --type tsx
done

Length of output: 4443


Script:

#!/bin/bash
# Let's fix the regex issues and file type recognition

# First, check if the global CSS file exists
echo "Checking if global CSS file exists..."
cat src/style/app.module.css

# Then search for CSS classes with fixed regex
echo -e "\nChecking for CSS classes..."
rg -l "\.volunteerCreateModal" src/style/app.module.css
rg -l "\.titlemodal" src/style/app.module.css
rg -l "\.modalCloseBtn" src/style/app.module.css
rg -l "\.noOutline" src/style/app.module.css
rg -l "\.TableImage" src/style/app.module.css
rg -l "\.avatarContainer" src/style/app.module.css
rg -l "\.imageContainer" src/style/app.module.css
rg -l "\.modalTable" src/style/app.module.css

# Check component usage with fixed file types
echo -e "\nChecking component usage..."
rg "className.*volunteerCreateModal" "src/"
rg "className.*titlemodal" "src/"
rg "className.*modalCloseBtn" "src/"
rg "className.*noOutline" "src/"
rg "className.*TableImage" "src/"
rg "className.*avatarContainer" "src/"
rg "className.*imageContainer" "src/"
rg "className.*modalTable" "src/"

Length of output: 32276

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 13, 2024
@Cioppolo14
Copy link

@gurramkarthiknetha Please fix the title of the PR to reflect what the PR is doing. Something doesn't seem right here, as its only running one check. Please make sure all the tests run, pass their tests, and there are not conflicting files.

@palisadoes
Copy link
Contributor

Please resolve the conflicting files. Hopefully if that gets resolved the rest of the tests will run

Copy link

@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

🧹 Outside diff range and nitpick comments (6)
src/style/app.module.css (6)

283-284: Remove commented-out CSS properties

The properties width: 25px !important; and height: 25px !important; are commented out. If they're no longer needed, consider removing them to keep the code clean and maintainable.


526-528: Minimize the use of !important in your CSS

Using !important can make the CSS harder to maintain and override, as it increases specificity and can lead to unexpected behavior. Consider refactoring the styles to reduce reliance on !important declarations.

For example, in the following selectors:

    /* Line 527 */
    .toggleBtn:hover {
-     color: #31bb6b !important;
+     color: #31bb6b;
    }

    /* Line 531 */
    input[type='radio']:checked + label {
-     background-color: #31bb6a50 !important;
+     background-color: #31bb6a50;
    }

    /* Line 535 */
    input[type='radio']:checked + label:hover {
-     color: black !important;
+     color: black;
    }

    /* Line 673 */
    .chipIcon {
-     height: 0.9rem !important;
+     height: 0.9rem;
    }

    /* Line 681 */
    .active {
-     background-color: #31bb6a50 !important;
+     background-color: #31bb6a50;
    }

    /* Lines 685-687 */
    .pending {
-     background-color: #ffd76950 !important;
-     color: #bb952bd0 !important;
-     border-color: #bb952bd0 !important;
+     background-color: #ffd76950;
+     color: #bb952bd0;
+     border-color: #bb952bd0;
    }

This will make your CSS more maintainable and easier to override when necessary.

Also applies to: 531-532, 535-536, 673-674, 681-682, 685-687


553-571: Consolidate duplicate and conflicting CSS properties

In the .greenregbtn class, there are duplicate or conflicting properties that can be simplified:

  1. Duplicate width properties (Lines 561 and 570):

    Remove the second width: 100%; declaration.

      background-color: var(--bs-primary);
      width: 100%;
      font-size: 16px;
      color: var(--bs-white);
      outline: none;
      font-weight: 600;
      cursor: pointer;
      transition:
        transform 0.2s,
        box-shadow 0.2s;
  • width: 100%;

2. **Conflicting `margin` properties (Lines 554 and 555):**

There is a conflict between `margin: 1rem 0 0;` and `margin-top: 15px;`. Choose one to accurately reflect the desired spacing.

```diff
  margin: 1rem 0 0;
-    margin-top: 15px;
  border: 1px solid var(--bs-gray-300);

605-605: Remove unnecessary commented-out code

There are commented-out CSS properties that can be removed if they're no longer needed. Cleaning up commented code improves readability.

  • Line 605 (.btnsContainer class):

    -   /* margin: 0.5rem 0 1.5rem 0; */
  • Lines 283-284 (Commented-out widths in an unspecified selector):

    -     /* width: 25px !important; */
    -     /* height: 25px !important; */

Also applies to: 283-284


607-607: Remove duplicate margin declaration in .btnsContainer

The margin: 2.5rem 0; property is declared twice in the .btnsContainer class. Remove the duplicate to avoid confusion and maintain clean code.

    display: flex;
    margin: 2.5rem 0;
    align-items: center;
    gap: 10px;
    /* Adjust spacing between items */
-   margin: 2.5rem 0;

Also applies to: 611-611


640-645: Use CSS variables instead of hardcoded color values

For consistency and easier theming, consider replacing hardcoded color values with existing CSS variables. This will make it easier to maintain and update colors across the application.

Examples:

  • Line 527 (.toggleBtn:hover):

      .toggleBtn:hover {
  • color: #31bb6b !important;
    
  • color: var(--bs-primary) !important;
    
    }
    
    
  • Line 644 (.inputField):

      .inputField {
        margin-top: 10px;
        margin-bottom: 10px;
        background-color: white;
  • box-shadow: 0 1px 1px #31bb6b;
    
  • box-shadow: 0 1px 1px var(--bs-primary);
    
    }
    
    
  • Line 657 (.dropdown):

      .dropdown {
        background-color: white;
        border: 1px solid #31bb6b;
        position: relative;
        display: inline-block;
  • color: #31bb6b;
    
  • color: var(--bs-primary);
    
    }
    
    
  • Line 681 (.active):

      .active {
  • background-color: #31bb6a50 !important;
    
  • background-color: rgba(var(--bs-primary-rgb), 0.5) !important;
    
    }
    
    
  • Lines 685-687 (.pending):

      .pending {
  • background-color: #ffd76950 !important;
    
  • color: #bb952bd0 !important;
    
  • border-color: #bb952bd0 !important;
    
  • background-color: rgba(var(--custom-warning-bg), 0.5) !important;
    
  • color: var(--custom-warning-text) !important;
    
  • border-color: var(--custom-warning-border) !important;
    
    }
    
    
  • Line 698 (.titlemodal):

      .titlemodal {
  • color: #707070;
    
  • color: var(--bs-gray-600);
    font-weight: 600;
    font-size: 32px;
    
    }
    
    

Ensure that the variables like --bs-primary, --bs-gray-600, and any new custom variables (--custom-warning-bg, etc.) are defined in your CSS.

Also applies to: 527-527, 644-644, 657-657, 681-682, 685-687, 698-698

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b0df665 and 121464f.

📒 Files selected for processing (1)
  • src/style/app.module.css (2 hunks)
🔇 Additional comments (1)
src/style/app.module.css (1)

722-723: Verify the aspect ratio of .avatarContainer dimensions

The .avatarContainer class has a width of 28px and a height of 26px. If the avatar images are intended to be square, consider adjusting the dimensions to maintain a consistent aspect ratio.

Please confirm if the current dimensions are intentional or if they should be updated to make the avatar images appear proportionate.

@gurramkarthiknetha gurramkarthiknetha changed the title Fixes #2505 Refactor CSS Structure for EventVolunteers: Improved Maintainability and UI Consistency Dec 13, 2024
@gurramkarthiknetha
Copy link
Author

@gurramkarthiknetha Please fix the title of the PR to reflect what the PR is doing. Something doesn't seem right here, as its only running one check. Please make sure all the tests run, pass their tests, and there are not conflicting files.

thank you for you suggestion @Cioppolo14
Now i changed to "Refactor CSS Structure for EventVolunteers: Improved Maintainability and UI Consistency" is this ok .

@palisadoes
Copy link
Contributor

Please fix the conflicting file

@gurramkarthiknetha
Copy link
Author

Please fix the conflicting file

Ok @palisadoes I will fix tonight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants