Skip to content

[PB-6439]: open referral widget via ?referral=open URL param#1976

Merged
terrerox merged 3 commits into
masterfrom
feature/direct-referral-opening
Jun 4, 2026
Merged

[PB-6439]: open referral widget via ?referral=open URL param#1976
terrerox merged 3 commits into
masterfrom
feature/direct-referral-opening

Conversation

@terrerox
Copy link
Copy Markdown
Contributor

Description

Add a URL contract so the Desktop app can deep-link users directly into the referral experience on Drive instead of only landing on the main page.

Introduce the useReferralParamsChange hook, which reads the ?referral=open query param and opens the Cello referral widget via referralService.openPanel once the user and eligibility have loaded. The widget only opens for eligible users, and the param is stripped from the URL afterwards so refresh/back navigation does not reopen it. The hook is wired into SidenavWrapper, the existing referral entry point.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

@terrerox terrerox changed the title feat: open referral widget via ?referral=open URL param [PB-6439]: open referral widget via ?referral=open URL param May 29, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 29, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0834385
Status: ✅  Deploy successful!
Preview URL: https://404dc5fa.drive-web.pages.dev
Branch Preview URL: https://feature-direct-referral-open.drive-web.pages.dev

View logs

@terrerox terrerox self-assigned this May 29, 2026
Comment on lines +25 to +28
referralService.openPanel(
{ name: user.name, lastname: user.lastname, email: user.email, emailVerified: user.emailVerified },
i18n.language,
);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this fails, should we notify the user in some way?

It would also be a good idea to add some tests to the hook :)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

@terrerox terrerox requested a review from CandelR June 2, 2026 15:10
@terrerox terrerox merged commit 8f86e2b into master Jun 4, 2026
10 of 11 checks passed
@terrerox terrerox deleted the feature/direct-referral-opening branch June 4, 2026 13:18
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.

2 participants