feat(pos-app): redesign settings view with bottom sheets#389
feat(pos-app): redesign settings view with bottom sheets#389ignaciosantise merged 11 commits intomainfrom
Conversation
- Replace inline dropdown component with bottom sheet modals and radio list UI - Add new "System" theme mode that respects device OS preference - Introduce SettingsItem, SettingsBottomSheet, and RadioList components - Refactor theme handling: add ThemeMode type with "light", "dark", "system" options - Move Merchant ID and Partner API Key inputs into dedicated bottom sheets - Add new theme icons (sun, moon, device-mobile) and caret-up-down icon - Remove Dropdown component (replaced by bottom sheet pattern) - Increment Android versionCode from 16 to 17 - Fix Partner API Key input to capture first character on edit Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ignaciosantise's task in 3s —— View job Code Review
License check: ✅ No issues — two new transitive MIT dev dependencies ( Breaking changes: ✅ No breaking changes — Found 4 issue(s)Issue 1: Partner API key logged in plaintext on every keystrokeID: dcl-settings-partner-api-key-logged-plaintext-a3f2 Context:
Recommendation: Remove the const handlePartnerKeyChange = (value: string) => {
- console.log("handlePartnerKeyChange", value);
if (!isEditingPartnerKey) {Issue 2: System theme is non-reactive — OS changes not detected at runtimeID: use-color-scheme-system-non-reactive-b7e1 Context:
Recommendation: Use React Native's import { useColorScheme as useRNColorScheme } from 'react-native';
export const useColorScheme = () => {
const themeMode = useSettingsStore((state) => state.themeMode);
const systemScheme = useRNColorScheme(); // reactive
if (themeMode === 'system') {
return systemScheme || 'light';
}
return themeMode || 'light';
};Apply the same pattern in Issue 3: Partner API Key SettingsItem always shows masked value even when no key is setID: settings-partner-key-display-misleading-c4d9 Context:
Recommendation: <SettingsItem
value={storedPartnerApiKey ? "**********" : undefined}
onPress={() => setActiveSheet("partnerApiKey")}
/>
Issue 4: Async save handlers called without await — errors silently unhandledID: settings-async-handler-no-await-f2a3 Context:
Recommendation: const handleMerchantIdSave = async () => {
await handleMerchantIdConfirm();
closeSheet();
};
const handlePartnerApiKeySave = async () => {
await handlePartnerApiKeyConfirm();
closeSheet();
}; |
There was a problem hiding this comment.
Pull request overview
Redesigns the POS app Settings screen to use a bottom-sheet based selection/editing flow (radio lists + sheets) and adds a new “System” theme mode option, while removing the legacy inline dropdown UI.
Changes:
- Replaces the old
DropdownUI withSettingsItem+SettingsBottomSheet+RadioListpatterns across settings selections. - Introduces
ThemeMode = "light" | "dark" | "system"and updates theme resolution + StatusBar behavior for “system”. - Moves Merchant ID / Partner API Key editing into dedicated bottom sheets and bumps Android
versionCodeto 17.
Reviewed changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dapps/pos-app/store/useSettingsStore.ts | Adds ThemeMode (including system), updates persisted store version. |
| dapps/pos-app/package-lock.json | Lockfile updates (adds nested dev dependencies). |
| dapps/pos-app/hooks/use-theme-color.ts | Resolves system mode to an actual light/dark scheme for color selection. |
| dapps/pos-app/hooks/use-merchant-flow.ts | Exposes storedPartnerApiKey to consumers (used by settings UI). |
| dapps/pos-app/hooks/use-color-scheme.ts | Adds system mode behavior for navigation theme selection. |
| dapps/pos-app/components/settings-item.tsx | New tappable row component used to open sheets / trigger actions. |
| dapps/pos-app/components/settings-bottom-sheet.tsx | New bottom sheet wrapper built on FramedModal. |
| dapps/pos-app/components/radio-list.tsx | New radio list UI for selecting among options with optional icons. |
| dapps/pos-app/components/dropdown.tsx | Removes legacy dropdown component. |
| dapps/pos-app/assets/images/sun.png | New theme icon asset. |
| dapps/pos-app/assets/images/moon.png | New theme icon asset. |
| dapps/pos-app/assets/images/device-mobile.png | New theme icon asset for “system”. |
| dapps/pos-app/assets/images/caret-up-down.png | New caret icon asset for settings rows. |
| dapps/pos-app/app/settings.tsx | Reworks settings screen to use bottom sheets + radio lists + sheet-based inputs. |
| dapps/pos-app/app/payment-success.tsx | Adjusts StatusBar style handling for themeMode === "system". |
| dapps/pos-app/app.json | Bumps Android versionCode from 16 → 17. |
Files not reviewed (1)
- dapps/pos-app/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…eedback Add fade + slide-up animations to web modals using react-native-reanimated. Update tests for "system" default theme mode and persist version 12. Address PR review feedback: async handlers, partner API key rename merge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Portal mobile web modal to document.body so backdrop covers full viewport including header - Skip KeyboardAvoidingView on web to prevent empty gap below modal when keyboard opens - Fix exhaustive-deps warnings in useEffect hooks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and visualViewport - Use position: fixed for mobile web modal to prevent scroll displacement - Track visualViewport height to constrain overlay above keyboard - Fixes gap below modal when keyboard opens and view not restoring on close Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… formatting Stop loading the actual partner API key into component state. Instead use the isPartnerApiKeySet flag from the store and display a masked placeholder in the UI. This keeps the sensitive value in secure storage only. Also applies prettier formatting fixes across several files and moves ThemeMode type to utils/types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude review |
|
Claude finished @ignaciosantise's task in 3m 46s —— View job Code Review
🔄 Incremental Review — checking state of previous issues and new changes Previously flagged issues:
Found 2 issue(s)Issue 1: Bottom sheet content offset 300px off-screen on nativeID: settings-bottom-sheet-native-translatey-f1c3 Context:
Recommendation: // Option A: skip the animated style on native (Modal handles its own animation)
<Animated.View
style={[
styles.sheet,
{ backgroundColor: Theme["bg-primary"] },
Platform.OS === "web" ? sheetAnimatedStyle : undefined,
]}
>
// Option B: initialize translateY to 0 on native
const translateY = useSharedValue(Platform.OS === "web" ? 300 : 0);Issue 2: Stale
|
Summary
Redesigned the POS app settings screen with a modern bottom sheet modal pattern, replacing the inline dropdown component. Added support for three theme modes (System, Light, Dark) with new theme selection UI.
Key changes:
Test Plan
🤖 Generated with Claude Code