-
-
Notifications
You must be signed in to change notification settings - Fork 840
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 AverageRating component to use CSS modules for styling #3213
Refactor AverageRating component to use CSS modules for styling #3213
Conversation
WalkthroughThis pull request focuses on refactoring the CSS styling in the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/style/app.module.css (1)
949-955
: Consider using CSS variables for colors.While the color values work correctly, consider using CSS variables for consistency and maintainability. The file already defines color variables that could be reused.
.ratingFilled { - color: #ff6d75; + color: var(--red-delete-text); } .ratingHover { - color: #ff3d47; + color: var(--delete-button-color); }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/EventStats/Statistics/AverageRating.tsx
(3 hunks)src/style/app.module.css
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (4)
src/components/EventStats/Statistics/AverageRating.tsx (3)
7-7
: LGTM! Import statement for CSS modules added correctly.The import statement for the CSS module is properly added.
36-36
: LGTM! Card styling moved to CSS modules.The inline width style has been correctly replaced with the
cardContainer
class from CSS modules.
53-56
: LGTM! Rating component styling moved to CSS modules.The Rating component's styling has been properly migrated to use CSS module classes for filled and hover states.
src/style/app.module.css (1)
945-947
: LGTM! Card container width defined correctly.The
cardContainer
class properly sets a fixed width of 300px.
@Aayushgoyal00 Please fix the failed tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
3cf1b07
to
74cb9aa
Compare
024f421
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Refactoring
Issue Number:
Fixes #2902
Did you add tests for your changes?
No
Snapshots/Videos:
https://github.com/user-attachments/assets/5882d06b-dc05-447b-9fc5-709ac1babef8
If relevant, did you update the documentation?
No
Summary
-All embedded CSS in the file (talawa-admin\src\components\EventStats\Statistics\AverageRating.tsx) has been merged into the global CSS file (talawa-admin\src\style\app.module.css) using pre-existing CSS.
-All embedded CSS in this file (talawa-admin\src\components\EventStats\Statistics\AverageRating.tsx) has been removed,
Does this PR introduce a breaking change?
No
Have you read the contributing guide?
Yes
Summary by CodeRabbit