Skip to content

feat(condo): DOMA-13035 add marketplace alert#7442

Merged
Alexander-Turkin merged 3 commits intomainfrom
feat/condo/DOMA-13035/add-merketplace-alert
Apr 12, 2026
Merged

feat(condo): DOMA-13035 add marketplace alert#7442
Alexander-Turkin merged 3 commits intomainfrom
feat/condo/DOMA-13035/add-merketplace-alert

Conversation

@Alexander-Turkin
Copy link
Copy Markdown
Contributor

@Alexander-Turkin Alexander-Turkin commented Apr 9, 2026

image

Summary by CodeRabbit

  • New Features
    • Payment reports now show an informational alert in the chart area when the Marketplace feature isn't enabled, encouraging users to enable it to expand earning opportunities.
  • Localization
    • Added the Marketplace hint message in English, Spanish, and Russian.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

📝 Walkthrough

Walkthrough

Inserted a marketplace hint into the payment total chart using a subscription guard that can render a localized informational Alert when chart data exists. Relaxed SubscriptionGuardWithTooltip’s children prop type to allow null. Added localization keys for EN/ES/RU and an optional tooltipButtonId prop to NoSubscriptionTooltip.

Changes

Cohort / File(s) Summary
Chart — marketplace hint
apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx
Imported Alert and SubscriptionGuardWithTooltip; when data.length > 0 inserted SubscriptionGuardWithTooltip feature='marketplace' placement='bottom' children={null} with fallback rendering a localized Alert (pages.reports.paymentsTotalMarketplaceHint).
Subscription guard props
apps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsx
Relaxed SubscriptionFeatureGuardProps children type from React.ReactElement to `React.ReactElement
NoSubscription tooltip id
apps/condo/domains/subscription/components/NoSubscriptionTooltip.tsx
Added optional tooltipButtonId?: string prop and passed it as id={tooltipButtonId} to the rendered Button.
Localization
apps/condo/lang/en/en.json, apps/condo/lang/es/es.json, apps/condo/lang/ru/ru.json
Added pages.reports.paymentsTotalMarketplaceHint translation entries for English, Spanish, and Russian.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped to the charts with a curious glance,
A marketplace whisper gave the numbers a chance,
Guarded and gentle, in three tongues it sings,
A little info Alert atop careful things,
I nibbled a carrot and celebrated the change.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a marketplace alert feature to the condo application.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/condo/DOMA-13035/add-merketplace-alert

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.

Copy link
Copy Markdown
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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsx`:
- Line 7: The component SubscriptionGuardWithTooltip declares children as
optional but sometimes returns children directly, which can yield undefined;
update the children prop type to allow null (e.g., children?: React.ReactElement
| null) and change the return sites that currently return children to explicitly
return children ?? null (or otherwise return null when children is undefined) so
the component always returns valid JSX (null) instead of undefined.

In `@apps/condo/lang/es/es.json`:
- Line 3072: Update the translation value for the key
"pages.reports.paymentsTotalMarketplaceHint": replace the phrase "servicios
pagos" with the more natural es-ES variant "servicios de pago" so the string
reads "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la
sección «Marketplace»".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d237b66b-e613-4401-bfd5-ff90b0e7ca97

📥 Commits

Reviewing files that changed from the base of the PR and between 36a6015 and 8293b19.

📒 Files selected for processing (5)
  • apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx
  • apps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsx
  • apps/condo/lang/en/en.json
  • apps/condo/lang/es/es.json
  • apps/condo/lang/ru/ru.json

Comment thread apps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsx Outdated
"pages.reports.paymentsAmountPercent": "Pagos",
"pages.reports.paymentsByProperty": "Pagos por comunidad",
"pages.reports.paymentsTotal": "Recibos de pago (de la aplicación móvil del vecino)",
"pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use a more natural es-ES phrasing for paid services.

Line 3072 currently says “servicios pagos”. For consistency with the rest of this locale and more natural es-ES wording, prefer “servicios de pago”.

✏️ Suggested copy update
-  "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»",
+  "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la sección «Marketplace»",
📝 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.

Suggested change
"pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»",
"pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la sección «Marketplace»",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/condo/lang/es/es.json` at line 3072, Update the translation value for
the key "pages.reports.paymentsTotalMarketplaceHint": replace the phrase
"servicios pagos" with the more natural es-ES variant "servicios de pago" so the
string reads "Puede ganar más ofreciendo servicios de pago a los vecinos si
activa la sección «Marketplace»".

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx`:
- Line 34: The tooltipButtonId string passed to the PaymentTotalChart component
is misspelled as "PaymentTotalChartSubscriprionTooltip"; update the prop value
(tooltipButtonId) in the PaymentTotalChart JSX to the correct identifier, e.g.
"PaymentTotalChartSubscriptionTooltip", so tests and analytics hooks that rely
on that selector are stable — locate the tooltipButtonId prop in the
PaymentTotalChart component usage and replace the misspelled token with the
corrected "Subscription" spelling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7841a13c-ab8c-4261-8166-6c67dcb1f6fd

📥 Commits

Reviewing files that changed from the base of the PR and between e4b5c01 and 04d8c36.

📒 Files selected for processing (2)
  • apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx
  • apps/condo/domains/subscription/components/NoSubscriptionTooltip.tsx

feature='marketplace'
placement='bottom'
children={null}
tooltipButtonId='PaymentTotalChartSubscriprionTooltip'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in tooltip button id (Line 34).

PaymentTotalChartSubscriprionTooltip likely has a misspelling. This can make test selectors and analytics hooks brittle.

✏️ Proposed fix
-                    tooltipButtonId='PaymentTotalChartSubscriprionTooltip'
+                    tooltipButtonId='PaymentTotalChartSubscriptionTooltip'
📝 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.

Suggested change
tooltipButtonId='PaymentTotalChartSubscriprionTooltip'
tooltipButtonId='PaymentTotalChartSubscriptionTooltip'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx`
at line 34, The tooltipButtonId string passed to the PaymentTotalChart component
is misspelled as "PaymentTotalChartSubscriprionTooltip"; update the prop value
(tooltipButtonId) in the PaymentTotalChart JSX to the correct identifier, e.g.
"PaymentTotalChartSubscriptionTooltip", so tests and analytics hooks that rely
on that selector are stable — locate the tooltipButtonId prop in the
PaymentTotalChart component usage and replace the misspelled token with the
corrected "Subscription" spelling.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@Alllex202 Alllex202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Alexander-Turkin Alexander-Turkin merged commit 5a5958c into main Apr 12, 2026
82 of 85 checks passed
@Alexander-Turkin Alexander-Turkin deleted the feat/condo/DOMA-13035/add-merketplace-alert branch April 12, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants