reduce receipt content font size#894
Conversation
|
Warning Rate limit exceeded@belwalshubham has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 38 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested reviewers
Poem
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
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
wp-content/civi-extensions/goonjcustom/Civi/InstitutionMaterialContributionService.php (3)
229-247: Consider using CSS variables for consistent font sizes.The font sizes are hardcoded in multiple places. Consider using CSS variables to maintain consistency and make future updates easier.
<style> + :root { + --font-size-small: 12px; + --font-size-medium: 14px; + } .table-header { text-align: left; font-weight: bold; - font-size: 14px; + font-size: var(--font-size-medium); } .table-cell { - font-size: 14px; + font-size: var(--font-size-medium); text-align: center; } </style>
Line range hint
280-293: Consolidate font size declarations.Multiple elements use the same font size (12px). Consider using a common CSS class.
+<style> + .text-small { + font-size: 12px; + } +</style> -<div style="float: left; width: 60%; font-size: 12px;"> +<div style="float: left; width: 60%;" class="text-small">
295-307: Improve address section styling.The address section has inconsistent styling and a color property without a value.
- <div style="font-size: 12px; float: left; color:"> + <div style="font-size: 12px; float: left;">
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
wp-content/civi-extensions/goonjcustom/Civi/InstitutionMaterialContributionService.php(7 hunks)
🔇 Additional comments (1)
wp-content/civi-extensions/goonjcustom/Civi/InstitutionMaterialContributionService.php (1)
141-141: LGTM: Method signature changes.The addition of the contribution parameter to both methods improves the data flow and maintains consistency.
Also applies to: 204-204
| return; | ||
| } | ||
|
|
||
| error_log("objectRef: " . print_r($objectRef, TRUE)); |
There was a problem hiding this comment.
Remove or sanitize error logging in production code.
The error logging of $objectRef might expose sensitive data. Consider removing it or sanitizing the output.
- error_log("objectRef: " . print_r($objectRef, TRUE));
+ // Log only necessary fields or remove in production
+ error_log("Processing AfformSubmission ID: " . $objectId);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| error_log("objectRef: " . print_r($objectRef, TRUE)); | |
| error_log("Processing AfformSubmission ID: " . $objectId); |
| $activities = Activity::get(FALSE) | ||
| ->addSelect('*') | ||
| ->addJoin('Organization AS organization', 'LEFT') | ||
| ->addWhere('activity_type_id:name', '=', 'Institution Material Contribution') | ||
| ->addWhere('organization.id', '=', 17383) | ||
| ->addOrderBy('created_date', 'DESC') | ||
| ->setLimit(1) | ||
| ->execute(); |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Avoid hardcoding organization ID.
The organization ID (17383) should not be hardcoded. Consider moving it to configuration.
- ->addWhere('organization.id', '=', 17383)
+ ->addWhere('organization.id', '=', GOONJ_ORGANIZATION_ID)Committable suggestion skipped: line range outside the PR's diff.
Summary by CodeRabbit
New Features
Improvements