Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect potentially non Next Gen users to prototype version #247

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

microbit-grace
Copy link

@microbit-grace microbit-grace commented Feb 29, 2024

  • Shown to users before browser compatibility warning dialog
  • Shown only if they are detected to be in the UK (GB), Isle of Man (IM), Jersey (JE), or Guernsey (GG)
  • Should only be shown once to the user
  • API proxy for calling browser info endpoint for local dev via .env
Screenshot 2024-02-29 at 14 48 41

Copy link

@microbit-grace microbit-grace force-pushed the redirect-to-prototype branch 2 times, most recently from 209046f to 21d30c5 Compare February 29, 2024 14:36
…#243)

- Shown to users before browser compatibility warning dialog
- Shown only if they are detected to be in the UK (GB), Isle of Man (IM), Jersey (JE), or Guernsey (GG)
- Should only be shown once to the user
- API proxy for calling browser info endpoint for local dev via .env

(cherry picked from commit 0aa4729)
@microbit-grace microbit-grace changed the title [WIP] Redirect potentially non Next Gen users to prototype version Redirect potentially non Next Gen users to prototype version Feb 29, 2024
@microbit-grace microbit-grace marked this pull request as ready for review February 29, 2024 14:50
@microbit-matt-hillsdon microbit-matt-hillsdon marked this pull request as draft February 29, 2024 15:01
if (!get(hasSeenAppVersionRedirectDialog)) {
const { country } = await fetchBrowserInfo();
const nextGenAvailableCountries = ['GB', 'JE', 'IM', 'GG'];
isPotentiallyNonNextGenUser = !nextGenAvailableCountries.includes(country || '');

Choose a reason for hiding this comment

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

I find it strange that TypeScript complains about country being undefined, as it's perfectly valid code without the || '', nevermind.

Copy link

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

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

LGTM.

@microbit-matt-hillsdon microbit-matt-hillsdon marked this pull request as ready for review April 18, 2024 15:08
@microbit-matt-hillsdon microbit-matt-hillsdon merged commit a4c70eb into maint-nextgen Apr 18, 2024
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the redirect-to-prototype branch April 18, 2024 15:08
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.

None yet

3 participants