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

User portal as per figma design #3197 #3746

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

Conversation

khushipatil1523
Copy link
Contributor

@khushipatil1523 khushipatil1523 commented Feb 24, 2025

What kind of change does this PR introduce?

UI/UX improvement, refactoring of CSS for better accessibility and maintainability.

Issue Number:

Fixes #3197

Description
This PR addresses the issue "Organization Screen Violates the Figma Style Guide" by implementing the following changes:

Changes Made
Consolidated all CSS into src/style/app.module.css:

here is screenshot of Updated the Organization Screen to match the Figma style guide:
Screenshot 2025-02-24 195509

Applied proper spacing, alignment, and colors as per the provided Figma file.

Standardized buttons and dropdowns with hover shadows but no color changes.

Ensured search boxes only show shadows when selected.
Does this PR introduce a breaking change?

No, this PR does not introduce breaking changes. It only refactors styles and updates UI components for consistency and accessibility.

Summary by CodeRabbit

  • Documentation

    • Updated function documentation to accurately reflect its definition location.
  • UI Enhancements

    • Redesigned the profile menu for improved accessibility and a clearer interface with updated icons and visual cues.
    • Simplified the organizations display by removing pagination, presenting a straightforward list view.
  • Style Updates

    • Refined button and layout styling, including improved spacing and responsive adjustments for a more consistent look.
    • Introduced new styles for profile elements and adjusted existing styles for better visual consistency.

Copy link
Contributor

coderabbitai bot commented Feb 24, 2025

Walkthrough

The changes update documentation and modify several components and style files. In the documentation, the line reference for the default() function in Organizations.tsx is adjusted from line 101 to 100. The ProfileDropdown component now uses a custom div-based structure with accessibility roles, and the UserSidebar component now utilizes dynamic class names. The Organizations.tsx file has its pagination logic removed, hardcoding organizations display to a fixed count. Additionally, CSS files have been updated to modify component spacing, button styles, and layout details.

Changes

File(s) Summary
docs/.../default.md Updated documentation: default() function location changed from line 101 to 100 in Organizations.tsx.
src/components/ProfileDropdown/ProfileDropdown.tsx Removed react-bootstrap Dropdown; replaced with a div structure using role="button" and tabIndex={0}; updated class names and layout; maintained logout functionality within a styled ButtonGroup.
src/components/UserPortal/UserSidebar/UserSidebar.tsx Changed static "mt-auto" class to a dynamic class (styles.profileContainer) for the container wrapping ProfileDropdown.
src/screens/UserPortal/Organizations/Organizations.tsx Removed pagination state and logic; hardcoded the number of organizations to display (first: 10); simplified rendering of organization cards with updated key usage.
src/style/app-fixed.module.css Modified .btnsContainer: added padding-left: 20px !important;, updated gap from 10px to 5px, and commented out the media query flex-direction adjustment.
src/style/app.module.css Updated button styles: changed colors and borders for .outlineBtn and .joinedBtn, increased .leftDrawer width, and added new styles for profile dropdown elements and layout flex adjustments.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant PD as ProfileDropdown Component
    participant LG as Logout Handler

    U->>PD: Click on profile container (div with role="button")
    PD->>PD: Display profile text with arrow icon and logout button group
    U->>PD: Click logout button
    PD->>LG: Trigger logout action
Loading

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes

Poem

I'm a rabbit hopping through the code,
Carrots and changes on this new road.
Lines shifted, styles refactored clean,
Dropdowns simplified, and pagination unseen.
With a twitch of my nose, I celebrate every node!
🥕🐇 Happy coding!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 236d537 and 65eb18b.

📒 Files selected for processing (2)
  • src/components/ProfileDropdown/ProfileDropdown.spec.tsx (5 hunks)
  • src/screens/UserPortal/Organizations/Organizations.spec.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • src/screens/UserPortal/Organizations/Organizations.spec.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (5)
src/components/ProfileDropdown/ProfileDropdown.spec.tsx (5)

18-18: Well-implemented session mock for improved testing

The addition of the mockEndSession function and the mock for the useSession hook allows for more accurate testing of the logout functionality. This is a good practice for isolating the component behavior during testing.

Also applies to: 29-34


105-135: Good test coverage additions

These new tests cover important edge cases:

  1. Avatar rendering when user image is null
  2. Name truncation for long names

These tests will help ensure the component handles these scenarios correctly, improving overall reliability.


142-144: Consistent i18n provider implementation

The consistent wrapping of the ProfileDropdown component in I18nextProvider ensures proper internationalization support across all tests. This change improves test consistency.

Also applies to: 156-158, 169-171


177-181: Improved logout functionality testing

The updated logout test now correctly verifies both the session termination and navigation behavior. Testing that mockEndSession is called is more accurate than just checking for navigation.


204-225: Updated routing tests with correct paths

The routing tests now properly check for navigation to the correct paths based on the user's role and context:

  • /member/:orgId when an organization ID is present
  • /member/ when no organization ID is available

The test descriptions have also been improved for clarity.

Also applies to: 227-248

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
  • @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: 5

🔭 Outside diff range comments (2)
src/style/app.module.css (2)

681-682: 🛠️ Refactor suggestion

Fix inconsistent button styling.

The .leftDrawer class has inconsistent button styling with duplicate properties and potential specificity issues.

Apply this diff to consolidate the button styles:

.leftDrawer button {
-  position: relative;
-  margin: 0.7rem 0;
-  padding: 2.5rem 0.1rem;
-  border-radius: 16px;
+  position: relative;
+  margin: 0.7rem 0;
+  padding: 2.5rem 0.1rem;
+  border-radius: 16px;
+  border: none;
+  outline: none;
+  transition: all 0.2s ease;
}

Also applies to: 683-684, 685-686, 687-688


525-532: 🛠️ Refactor suggestion

Consolidate media queries for better maintainability.

The media queries are scattered throughout the file and should be consolidated.

Move all media queries to the end of the file and use a consistent structure:

/* Media Queries */
@media screen and (max-width: 1200px) {
  /* Desktop */
}

@media screen and (max-width: 992px) {
  /* Tablet Landscape */
}

@media screen and (max-width: 768px) {
  /* Tablet Portrait */
}

@media screen and (max-width: 576px) {
  /* Mobile */
}

Also applies to: 1807-1819, 2010-2029, 3581-3600

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

651-656: Consider removing !important and uncommented properties.

The changes to .btnsContainer have some potential issues:

  1. Using !important makes styles harder to maintain and override.
  2. Commented properties (width and flex-direction) should be either removed or uncommented if needed.

Apply this diff to improve maintainability:

-  padding-left: 20px !important;
+  padding-left: 20px;
-  /* width: 60%; */
src/style/app.module.css (5)

883-889: Improve hover state styling for better visual feedback.

The hover state styling could be improved for better visual feedback.

Apply this diff to enhance the hover state:

.outlineBtn:is(:hover, :active) {
  margin-bottom: 10px;
  color: var(--black-color) !important;
  background-color: var(--joined-button-bg);
  border-color: var(--joined-button-bg);
-  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
+  box-shadow: var(--hover-shadow);
+  transform: translateY(-1px);
}

8098-8104: Improve layout styling for better responsiveness.

The main container layout could be improved for better responsiveness.

Apply this diff to enhance the layout:

.mainContainerOrganization {
  display: flex;
  flex-wrap: wrap;
-  gap: 16px; /* Space between cards */
-  justify-content: space-between; /* Ensures cards are spread out */
-  padding-left: 20px !important;
-  margin-top: 10px;
+  gap: var(--spacing-lg, 16px);
+  justify-content: flex-start;
+  padding: var(--spacing-md, 20px);
+  margin: var(--spacing-sm, 10px) 0;
}

1-36: Enhance CSS documentation for better maintainability.

The CSS documentation could be improved to better explain the methodology and provide more examples.

Add more comprehensive documentation:

/**
 * CSS Methodology for Common Styles:
 *
 * This project aims to reduce CSS duplication by merging similar styles across components
 * into reusable global classes. This ensures consistency and simplifies maintenance.
 *
 * Steps for contributors:
 * 1. Identify duplicate or similar styles in different components (e.g., buttons, modals).
 * 2. Create a global class with a clear, descriptive name (e.g., .addButton, .removeButton).
 * 3. Use the new global class in all components requiring that style.
 *
+ * CSS Architecture:
+ * - Use CSS custom properties (variables) for theming and consistent values
+ * - Follow BEM naming convention for component-specific styles
+ * - Use utility classes for common patterns
+ * - Maintain a flat specificity to avoid specificity wars
+ *
+ * Responsive Design:
+ * - Use mobile-first approach
+ * - Define breakpoints using CSS variables
+ * - Use flexbox and grid for layouts
+ *
 * Example:
 * Instead of component-specific classes like:
 *   `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`
 * Use:
 *   `.addButton` (a single reusable class)
 */

38-231: Improve CSS custom properties organization.

The CSS custom properties could be better organized for improved maintainability.

Reorganize the custom properties into logical groups:

:root {
  /* Theme Colors */
  --primary: #1778f2;
  --secondary: #a8c7fa;
  --success: #31bb6b;
  --danger: #ff4d4f;
  --warning: #febc59;
  
  /* Neutral Colors */
  --grey-50: #f6f8fc;
  --grey-100: #eaebef;
  --grey-500: #707070;
  --grey-900: #555555;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  
  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;

1-4640: Improve CSS file organization and reduce file size.

The CSS file is very large (4640+ lines) and should be split into smaller, more manageable files.

Consider splitting the CSS into multiple files:

  1. base.css - Reset, typography, and base styles
  2. components.css - Reusable component styles
  3. layout.css - Layout and grid styles
  4. utilities.css - Utility classes
  5. themes.css - Theme variables and dark mode styles
  6. media-queries.css - Responsive styles

Use CSS modules or a CSS-in-JS solution for component-specific styles to better encapsulate styles and prevent naming conflicts.

🧰 Tools
🪛 Biome (1.9.4)

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

(lint/suspicious/noShorthandPropertyOverrides)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3facd9f and cbd1ab7.

📒 Files selected for processing (6)
  • docs/docs/auto-docs/screens/UserPortal/Organizations/Organizations/functions/default.md (1 hunks)
  • src/components/ProfileDropdown/ProfileDropdown.tsx (3 hunks)
  • src/components/UserPortal/UserSidebar/UserSidebar.tsx (1 hunks)
  • src/screens/UserPortal/Organizations/Organizations.tsx (4 hunks)
  • src/style/app-fixed.module.css (2 hunks)
  • src/style/app.module.css (10 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/docs/auto-docs/screens/UserPortal/Organizations/Organizations/functions/default.md
🧰 Additional context used
🪛 Biome (1.9.4)
src/style/app.module.css

[error] 7966-7967: Unexpected value or character.

Expected one of:

(parse)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (8)
src/components/UserPortal/UserSidebar/UserSidebar.tsx (1)

126-126: LGTM! Improved class name semantics.

The change from a static class name "mt-auto" to a dynamic class name styles.profileContainer improves maintainability and aligns with the CSS refactoring objectives.

src/components/ProfileDropdown/ProfileDropdown.tsx (3)

52-54: LGTM! Improved container structure.

The new container structure with semantic class names (Profilebox, profileContainerarrowright, imageContainerSidebar) improves maintainability and aligns with the Figma style guide.


72-93: LGTM! Enhanced accessibility and user experience.

Great improvements to accessibility and UX:

  1. Added proper ARIA attributes (role="button", tabIndex={0}, aria-label)
  2. Added visual feedback with arrow icon
  3. Improved text structure with semantic class names

95-103: LGTM! Better logout button structure.

The use of ButtonGroup for the logout functionality provides a more semantic and maintainable structure.

src/screens/UserPortal/Organizations/Organizations.tsx (4)

124-125: Verify pagination removal against Figma design requirements.

The pagination functionality has been removed and the number of organizations is now hardcoded to 10. This could impact user experience when dealing with large datasets.

Please confirm if:

  1. The Figma design specifically calls for removing pagination
  2. Limiting to 10 organizations aligns with the design requirements
  3. There's a plan for handling scenarios with more than 10 organizations

Also applies to: 143-143


323-327: Verify alignment with Figma design.

The flex container has been replaced with a simpler div structure. While this simplifies the code, ensure it maintains the desired layout from the Figma design.

Please confirm the heading alignment and spacing match the Figma specifications.


391-422: Great improvements to organization card rendering!

The changes improve the code by:

  • Using proper TypeScript types for better type safety
  • Using organization ID as key instead of index
  • Implementing responsive grid layout with Bootstrap classes

318-319: CSS changes align well with the refactoring goals!

The styling updates improve maintainability by:

  • Using semantic class names for sidebar states
  • Applying consistent spacing with gap and padding utilities

Also applies to: 383-383

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 24, 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: 0

♻️ Duplicate comments (1)
src/style/app.module.css (1)

7694-7695: ⚠️ Potential issue

Fix inconsistent width declarations.

The width declarations are inconsistent and could cause layout issues.

Apply this diff to fix the width declarations:

-  width: calc(350px) !important;
+  width: 350px !important;

-  width: 300px + 2rem;
+  width: calc(300px + 2rem);

Also applies to: 7966-7967

🧹 Nitpick comments (4)
src/style/app.module.css (4)

877-888: Improve accessibility and user experience for outline buttons.

The .outlineBtn class has been updated with hover states and focus indicators, which is good for accessibility. However, we can further enhance it.

Add hover and active states with visual feedback:

.outlineBtn {
  margin-bottom: 10px;
  background-color: var(--joined-button-bg);
  color: var(--black-color);
  border-color: var(--joined-button-bg);
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
+ transform: translateY(0);
+ box-shadow: none;
}

.outlineBtn:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.outlineBtn:active {
+ transform: translateY(0);
+ box-shadow: none;
}

5000-5015: Improve accessibility and user experience for profile container.

The .profileContainer class has been updated with hover states and focus indicators, which is good for accessibility. However, we can further enhance it.

Add hover state and improve focus visibility:

.leftDrawer .profileContainer {
  background-color: transparent;
  color: #000;
  cursor: pointer;
  width: 100%;
  justify-content: flex-end;
  padding: 8px 10px;
  display: flex;
  transition: background-color 0.2s ease;
  border-radius: 8px;
  outline: none;
+ box-shadow: none;
}

.leftDrawer .profileContainer:hover {
+ background-color: var(--bs-gray-100);
}

.leftDrawer .profileContainer:focus-visible {
  outline: 2px solid var(--light-blue);
  outline-offset: 2px;
+ box-shadow: 0 0 0 4px rgba(168, 199, 250, 0.2);
}

8108-8116: Improve layout responsiveness for main container.

The main container layout has been updated with flexbox and gap properties, which is good for responsive design. However, we can further optimize it.

Add responsive grid layout and improve spacing:

.mainContainerOrganization {
  max-height: 100%;
  width: 100%;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding-left: 20px !important;
  margin-top: 10px;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
+ align-items: start;
+ padding: 20px !important;
}

9139-9244: Improve profile dropdown component styling and accessibility.

The profile dropdown component has been updated with proper spacing and transitions. However, we can enhance its accessibility and user experience.

Add ARIA roles and improve keyboard navigation:

.Profilebox {
  width: 100% !important;
  padding-bottom: 30px;
+ position: relative;
}

.profileContainerarrowright {
  border: none;
  padding: 2.1rem 0.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--profile-bg);
  border-radius: var(--border-radius-lg, 8px);
  transition: all 0.2s ease;
+ role: "button";
+ aria-haspopup: "true";
+ aria-expanded: "false";
+ tabindex: "0";
}

.logoutBtn {
  width: 100%;
  padding: 12px 15px;
  background-color: #a8c7fa;
  border: none;
  border-radius: 13px;
  color: #000;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
+ role: "menuitem";
+ aria-label: "Log out";
}

+ .logoutBtn:focus-visible {
+   outline: 2px solid var(--light-blue);
+   outline-offset: 2px;
+ }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cbd1ab7 and 236d537.

📒 Files selected for processing (2)
  • src/components/UserPortal/OrganizationCard/OrganizationCard.tsx (1 hunks)
  • src/style/app.module.css (9 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Test Application
  • GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (2)
src/components/UserPortal/OrganizationCard/OrganizationCard.tsx (2)

156-160: LGTM! Robust handling of undefined values.

The use of the nullish coalescing operator (??) to default to 0 when length is undefined improves the code's reliability and prevents potential rendering issues.


123-163:

❓ Verification inconclusive

Verify style classes against Figma design.

Since this PR aims to align with the Figma style guide, please ensure that the following style classes match the design specifications:

  • styles.orgCard
  • styles.innerContainer
  • styles.orgImgContainer
  • styles.content
  • styles.orgName
  • styles.orgdesc
  • styles.address
  • styles.orgadmin
  • styles.addButton
  • styles.withdrawBtn
  • styles.outlineBtn

Run this script to check if all style classes are defined in the consolidated CSS file:

Also applies to: 165-196


🏁 Script executed:

#!/bin/bash
# Description: Verify style classes used in OrganizationCard component exist in app.module.css

# Find all style classes used in the component
echo "Style classes used in OrganizationCard.tsx:"
rg -o 'styles\.[a-zA-Z]+' src/components/UserPortal/OrganizationCard/OrganizationCard.tsx | sort -u

# Check if these classes exist in app.module.css
echo -e "\nMatching classes in app.module.css:"
rg '^\.(orgCard|innerContainer|orgImgContainer|content|orgName|orgdesc|address|orgadmin|addButton|withdrawBtn|outlineBtn)\s*{' src/style/app.module.css

Length of output: 935


Action required: Verify consolidated CSS class definitions manually

The PR requires ensuring that the following style classes adhere to the Figma style guide and exist in the consolidated CSS file:

  • styles.orgCard
  • styles.innerContainer
  • styles.orgImgContainer
  • styles.content
  • styles.orgName
  • styles.orgdesc
  • styles.address
  • styles.orgadmin
  • styles.addButton
  • styles.withdrawBtn
  • styles.outlineBtn

It appears that the automated check encountered a regex error when verifying these classes in src/style/app.module.css. Please re-run the verification with the corrected regex below or manually confirm that all these class definitions are present in the consolidated CSS file:

#!/bin/bash
# Verify style classes used in OrganizationCard.tsx exist in app.module.css

echo "Style classes used in OrganizationCard.tsx:"
rg -o 'styles\.[a-zA-Z]+' src/components/UserPortal/OrganizationCard/OrganizationCard.tsx | sort -u

echo -e "\nMatching class definitions in app.module.css:"
rg '^\.(orgCard|innerContainer|orgImgContainer|content|orgName|orgdesc|address|orgadmin|addButton|withdrawBtn|outlineBtn)\s*\{' src/style/app.module.css

If discrepancies are found, please update the CSS accordingly to match the Figma design specifications.

🧰 Tools
🪛 Biome (1.9.4)

[error] 143-143: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 24, 2025
@palisadoes
Copy link
Contributor

  1. Please make coderabbit.ai approves your work.
  2. Make sure all tests pass and are valid.
  3. Ensure the test code coverage for your patch reaches as close to 100% as possible.

@khushipatil1523
Copy link
Contributor Author

@palisadoes While updating test cases, I noticed that clicking the "Join Now" button is not working. when i click on "Join Organization," it shows an "Error Occurred" message. After checking, I found that there is no mutation in the backend for joining an organization. All styling has been done according to the Figma style guide, but the "Join" button feature is broken. Should I cover this in this PR as well?

@palisadoes
Copy link
Contributor

Yes

@duplixx duplixx self-requested a review March 2, 2025 07:54
@duplixx
Copy link
Member

duplixx commented Mar 2, 2025

@khushipatil1523 Please refine the to ensure visual consistency with the existing UI
page spacing needs attention, please refer to figma link and use spacing variables from there

image

image

@khushipatil1523
Copy link
Contributor Author

@khushipatil1523 Please refine the to ensure visual consistency with the existing UI page spacing needs attention, please refer to figma link and use spacing variables from there

image

image

Got it! I'll refine the spacing to ensure visual consistency and align it with the existing UI. I'll refer to the Figma link and use the spacing variables from there. Thanks for the feedback!

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