feat(mobile): home-screen quick actions#76
Open
GSTJ wants to merge 3 commits into
Open
Conversation
Adds two long-press home-screen quick actions via expo-quick-actions: "Matches" (opens the messages tab) and "Edit profile" (opens profile/edit). Titles are set through the runtime JS API so they localize with the user's i18next locale and update live on an in-app language switch, matching the existing services/linking hook+handlers split for cold-start vs warm-resume routing. Bumps native version to 1.5.0 per app.config.ts's native-change policy.
- Move the new "quickActions" i18n key next to "preferences" in both translation.json files instead of tacking it on after "themes", to match the (loose) alphabetical-ish convention the rest of the file follows. - Add the testing notes for the quick-actions feature (44720a1) that were requested but never landed anywhere Gabriel would see them. Testing notes for Gabriel — home-screen quick actions (44720a1): iOS (simulator or device): 1. Build and install the dev client (`pnpm ios` from apps/mobile, or the EAS dev-client build) so the app.config.ts icon/version changes are picked up — quick actions are read from the native side on launch, a Metro-only reload won't pick up plugin changes. 2. Cold start: fully quit the app (swipe away from the app switcher, or `xcrun simctl terminate`), then long-press the Pegada icon on the home screen / springboard. "Matches" and "Edit profile" should show with the message-bubble and person SF Symbols. Tap one — the app should cold-launch straight into that tab/screen. 3. Warm resume: with the app already running in the foreground or background, go back to the home screen and long-press the icon again, tap an action — it should navigate immediately without a relaunch. 4. Language switch: change the in-app language (Profile > Language), background the app, long-press the icon again — titles should already reflect the new locale (no restart needed). Android: 1. Same dev client / build step as iOS. 2. Long-press the app icon (works on the launcher's app icon shortcut menu — Pixel/stock launcher supported; some OEM launchers vary). Only "Matches" and "Edit profile" labels show; there's no custom icon (Android needs drawables via the config plugin, which we skipped per handlers/icons.ts — falls back to the app's own icon). 3. Cold start: force-stop the app from Android settings first, then long-press → tap an action, confirm it opens directly to the right screen. 4. Warm resume: with the app open, go home, long-press, tap again, confirm immediate navigation. 5. Language switch: same as iOS — switch language in-app, background, re-check the shortcut labels without restarting.
Gate quick-action navigation behind the same "authenticated mount point" guarantee the linking service already relies on: useQuickActions now takes an `enabled` flag that's only true once _layout.tsx resolves initialRouteName to SceneName.Swipe. A tap before that (cold-start QuickActions.initial, or a warm tap while signed out / mid-onboarding) is held as a pending action and replayed once auth/onboarding resolves, instead of firing router.push synchronously and racing the async tRPC-driven redirect in _layout.tsx.
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
Long-pressing the app icon now shows two shortcuts, Matches and Edit profile, in the user's language.
Details
Testing steps