Add Trustpilot Review Collector widget for web - #2507
Merged
Conversation
Two halves of the same goal — ask more of the people who are actually getting value out of Solid, without asking any of them often. **Web/desktop gets a Trustpilot Review Collector.** There is no native review sheet on web, so the web app had no way to ask at all. Trustpilot's *in-app* review collector — the one that takes the rating inside our own UI and posts it through their API — is a paid plan, so this is the free embeddable widget: their stars, their form, one script. Every value is environment-configured (`EXPO_PUBLIC_TRUSTPILOT_*`) and the widget hides itself until the business unit id is set, so a build without the values renders nothing rather than an empty Trustpilot frame. When the script is blocked — an ad blocker, a corporate proxy — a plain link takes its place, because a blocked script should cost us the branding, not the review. It lives in settings. The widget is standing UI rather than a prompt: it cannot be timed to a happy moment the way the native sheet is, so putting it on a screen users pass through would be noise on every visit. In settings it is found by someone already looking for account actions. **The native prompt now covers Wirex cardholders.** It only ever fired on Rain card deposits, and a Wirex card is never funded — it spends the user's own wallet and savings — so its holders could never qualify. The backend now reads the signal that matches the issuer; this side just carries the new decision reasons through and reports which population a prompt came from, so the funnel can be read per issuer rather than as one average over two quite different triggers. `useCardDepositStoreReview` is renamed to `useAppOpenStoreReview` (and its trigger with it): the hook fires on an app open and deposits are now only one of the things that can qualify one, so the old name described a case rather than the rule. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SeWJWhmRXHqL4VNB8ktvia
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
The Trustpilot components are plain `.tsx` rather than `.web.tsx`, so Metro ships them in the native bundle. That is only safe because every web-only construct sits behind a `Platform.OS === 'web'` guard — including raw `<div>`/`<a>` elements, which React Native has no renderer for and which would throw if they ever reached it. A guard like that is one careless edit away from sitting below the code it protects, and the failure would surface only on a device: a red screen on the settings screen, invisible to `tsc` and to any web build. Render both components under the native preset, with Trustpilot reported as fully configured so the platform guard is the branch actually under test rather than the unconfigured early return. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SeWJWhmRXHqL4VNB8ktvia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Trustpilot's Review Collector widget to the web app, allowing users to leave reviews directly from the settings page. The widget is web-only and renders nothing on native platforms, which continue to use the OS review sheet instead.
Key Changes
New Trustpilot Widget Component (
TrustpilotWidget.tsx):Trustpilot Configuration (
constants/trustpilot.ts):EXPO_PUBLIC_TRUSTPILOT_BUSINESS_UNIT_IDto enable the widgetReview Card Component (
TrustpilotReviewCard.tsx):Store Review Hook Refactoring:
useCardDepositStoreReviewtouseAppOpenStoreReviewfor clarityStoreReviewSignalenum to track which population triggered the promptAppOpenResponsewithspendableUsdandsignalfieldsComponent Renaming:
CardDepositStoreReviewTrigger→AppOpenStoreReviewTriggerto reflect broader eligibility logicAnalytics & Configuration:
.env.examplewith Trustpilot configuration variablesImplementation Details
data-*attributes, allowing the script to configure itselfhttps://claude.ai/code/session_01SeWJWhmRXHqL4VNB8ktvia