Skip to content

Fix the feedbacks on QR code#1420

Merged
tarunnjoshi merged 1 commit intodevfrom
fix-the-feedbacks-for-qr
Sep 15, 2025
Merged

Fix the feedbacks on QR code#1420
tarunnjoshi merged 1 commit intodevfrom
fix-the-feedbacks-for-qr

Conversation

@tarunnjoshi
Copy link
Copy Markdown
Member

@tarunnjoshi tarunnjoshi commented Sep 15, 2025

Fix the feedbacks on QR code

Summary by CodeRabbit

  • New Features

    • QR codes for Dropping Center and Institution Dropping Center now display nearby landmark information alongside the city when available.
  • Style

    • Increased vertical spacing for QR heading text to improve legibility.
  • Other

    • No changes to QR codes for other event types.

@tarunnjoshi tarunnjoshi merged commit 5ac884b into dev Sep 15, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds landmark fields to the EckEntity select for Dropping_Center and Institution_Dropping_Center. Introduces landmark retrieval and attempts to append it to the city string before city is reassigned. Adjusts heading text vertical offset (topY) from 60 to 70. Other branches remain unchanged.

Changes

Cohort / File(s) Summary of Changes
QR code data selection and rendering
wp-content/civi-extensions/goonjcustom/Civi/Traits/QrCodeable.php
- Added select fields: Dropping_Centre.Landmark_or_Near_by_area, Institution_Dropping_Center_Intent.Landmark_or_Near_by_area
- For Dropping_Center and Institution_Dropping_Center: fetch landmark into $landmark; attempt to append to city as "City (Landmark)" before subsequent city overwrite
- Adjusted heading top offset: topY 60 → 70
- No public API signature changes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant QrCodeable
  participant EckEntity

  Caller->>QrCodeable: generate QR data
  QrCodeable->>EckEntity: select(..., City, District_City/Other_City, Landmark)
  EckEntity-->>QrCodeable: record with fields

  rect rgb(235,245,255)
  note right of QrCodeable: Dropping_Center / Institution_Dropping_Center branch
  QrCodeable->>QrCodeable: if landmark not empty, city = "City (Landmark)"
  QrCodeable->>QrCodeable: city = District_City or Other_City (overwrites)
  end

  QrCodeable->>QrCodeable: set heading topY = 70
  QrCodeable-->>Caller: QR payload + canvas layout
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

status : ready for review

Suggested reviewers

  • pokhiii

Poem

A landmark whispers near the city’s name,
Encoded hints inside a pixel frame.
The heading rises, ten dots high,
While venues shuffle, passing by.
QR hums softly, squares align—
Addresses wander, but scans are fine.
Beep—hello, design!

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-the-feedbacks-for-qr

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ada4c24 and 85df028.

📒 Files selected for processing (1)
  • wp-content/civi-extensions/goonjcustom/Civi/Traits/QrCodeable.php (4 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tarunnjoshi tarunnjoshi deleted the fix-the-feedbacks-for-qr branch September 15, 2025 11:14
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.

1 participant