Skip to content

feat: add platform-aware MobileDownloadActions for iOS/Android#405

Open
gonpombo8 wants to merge 10 commits intomasterfrom
feat/mobile-download-actions
Open

feat: add platform-aware MobileDownloadActions for iOS/Android#405
gonpombo8 wants to merge 10 commits intomasterfrom
feat/mobile-download-actions

Conversation

@gonpombo8
Copy link

Summary

  • Add MobileDownloadActions component with Android (Google Play button) and iOS (Share Link + Coming Soon badge) variants
  • Add GooglePlayIcon SVG component
  • Update MobileDownloadModal to require platform prop and use MobileDownloadActions instead of MobileStoreBadges
  • Update modal typography (title/description) to match Figma specs
  • Bump version to 1.3.11

What could break

  • MobileDownloadModal now requires platform prop (was optional) and removes badgeSize/iosStoreUrl props
  • Consumers using the old badge-based modal will need to pass platform: 'android' | 'ios'

How to test

  • Run Storybook: npm start
  • Check "Mobile Download Modal > AndroidPlatform" story — should show Google Play button
  • Check "Mobile Download Modal > IOSPlatform" story — should show Share Link button + Apple Coming Soon badge
  • Verify typography matches Figma specs (Inter, 22px bold title, 18px description)

@gonpombo8 gonpombo8 changed the title Add platform-aware MobileDownloadActions for iOS/Android feat: Add platform-aware MobileDownloadActions for iOS/Android Mar 19, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 19, 2026

Deploying ui2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4538c54
Status: ✅  Deploy successful!
Preview URL: https://975c12cd.ui2-423.pages.dev
Branch Preview URL: https://feat-mobile-download-actions.ui2-423.pages.dev

View logs

Replace MobileStoreBadges in MobileDownloadModal with MobileDownloadActions
that renders platform-specific CTAs: Google Play button for Android,
share link + Apple Coming Soon badge for iOS. Add GooglePlayIcon component.
Update modal typography to match Figma specs.
@gonpombo8 gonpombo8 force-pushed the feat/mobile-download-actions branch from a4f83d0 to 10bbdd8 Compare March 20, 2026 00:07
@gonpombo8 gonpombo8 changed the title feat: Add platform-aware MobileDownloadActions for iOS/Android feat add platform-aware MobileDownloadActions for iOS/Android Mar 20, 2026
@gonpombo8 gonpombo8 changed the title feat add platform-aware MobileDownloadActions for iOS/Android feat: add platform-aware MobileDownloadActions for iOS/Android Mar 20, 2026
Move title/description strings into MobileDownloadModal.i18n.ts with
optional i18n prop override, following the UserMenu pattern. Consumers
no longer need to pass title/description — just platform.
Move hardcoded button labels (GET IT ON, Google Play, SEND YOURSELF
THE LINK, Coming Soon) into i18n with optional override prop.
Adjust Coming Soon gap, title line-height, and spacing between
elements to match Figma. Remove modalProps spread that leaked
Storybook args into Modal causing back arrow to show.
- Rename folder to better reflect component purpose
- Fix WebGL texture lifecycle bug with cancellation flag
- Replace hardcoded colors with theme values
- Fix share API error handling to only swallow AbortError
- Use project AppleIcon instead of MUI's
- Fix memo pattern, type exports, and unused Fallback variant prop
- Extract i18n defaults and shared MobilePlatform type
- Add platform-specific phone image for Android modal
- Make MobileDownloadActions.platform required instead of optional
- Add actionsI18n prop to MobileDownloadModal for button text localization
Actions already have built-in defaults; the override can be added later
if localization is needed.
Copy link
Collaborator

@braianj braianj left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉
I've left some comments

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about converting into WEBP

fontSize: 22,
fontWeight: 700,
boxShadow: theme.shadows[4],
padding: '12px 20px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you review the paddings and margins using the theme.spacing function?

Comment on lines +20 to +33
const handleSendLink = useCallback(async () => {
const url = window.location.href
try {
if (navigator.share) {
await navigator.share({ url })
} else {
await navigator.clipboard.writeText(url)
}
onCopyLink?.()
} catch (error) {
if (error instanceof DOMException && error.name === 'AbortError') return
throw error
}
}, [onCopyLink])
Copy link
Collaborator

Choose a reason for hiding this comment

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

this function looks useful, WDYT about moving it to a global space like modules?

@@ -0,0 +1,17 @@
type MobilePlatform = 'android' | 'ios'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not enum?

Copy link
Collaborator

Choose a reason for hiding this comment

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

WDYT about applying a better background color like in other designs?

Image

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