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

feat: add change browser modal #402

Merged
merged 6 commits into from
Jan 16, 2024
Merged

feat: add change browser modal #402

merged 6 commits into from
Jan 16, 2024

Conversation

enesozturk
Copy link
Contributor

Description

iOS Chromium browsers don't have Add to Home Screen functionality. For the iOS users, we should redirect them to Safari instead. Added change browser modal and refactored conditions for the other modals to make sure that mobile Chroimum users should redirected to Safari first.

Type of change

  • New feature (non-breaking change which adds functionality)

Fixes/Resolves (Optional)

Examples/Screenshots (Optional)

Screenshot 2024-01-15 at 15 26 44

Checklist:

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Additional Information (Optional)

Closes https://github.com/WalletConnect/web3inbox-planning/issues/48

Copy link

vercel bot commented Jan 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-web3inbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2024 6:15pm

@chadyj
Copy link
Contributor

chadyj commented Jan 15, 2024

I tested on chrome on desktop, set to the pixel 7, but didn't see the screen as expected

Screenshot 2024-01-15 at 16 09 24

@enesozturk enesozturk requested a review from devceline January 15, 2024 15:12
Copy link
Contributor

@chadyj chadyj left a comment

Choose a reason for hiding this comment

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

Tested on an iphone. Works great 👍

src/utils/pwa.ts Outdated
export const isIOS = () => /iPhone|iPad|iPod/i.test(navigator.userAgent)

export const isChrome = () =>
browser?.name ? /chrome|crios|edge-chromium/i.test(browser?.name) : false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we cover brave here?

Copy link
Collaborator

@devceline devceline left a comment

Choose a reason for hiding this comment

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

There's a regression.

  • On dev tools, switch device to iPhone
  • Open preview
  • No PWA modal or Change browser modal

Copy link
Collaborator

@devceline devceline left a comment

Choose a reason for hiding this comment

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

LGTM

@enesozturk enesozturk merged commit 0135455 into main Jan 16, 2024
3 checks passed
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.

3 participants