From 30605aa43ef91c294106aa377ddd476fa0deb695 Mon Sep 17 00:00:00 2001 From: Bart de Lange Date: Fri, 27 Nov 2026 17:55:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(feature-new-game):=20Remove?= =?UTF-8?q?=20the=20iOS=20game=20mode=20pill=20shadow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/NewGame/GameMode/GameMode.tsx | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/libs/feature/new-game/src/ui/NewGame/GameMode/GameMode.tsx b/libs/feature/new-game/src/ui/NewGame/GameMode/GameMode.tsx index 4e305949..938c1458 100644 --- a/libs/feature/new-game/src/ui/NewGame/GameMode/GameMode.tsx +++ b/libs/feature/new-game/src/ui/NewGame/GameMode/GameMode.tsx @@ -1,14 +1,40 @@ -import { FC } from 'react'; +import { type ComponentProps, FC } from 'react'; import { useNavigation } from '@react-navigation/core'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { GameFlowStackNames, StepperParamList } from '../NewGame'; import { getDefaultOptions, useNewGame } from '../../../feature/NewGameContext'; import { LogoButton, AppHeader } from '@throwl/shared-ui'; import { SegmentedButtons, Text } from 'react-native-paper'; -import { StyleSheet, View } from 'react-native'; +import { Platform, StyleSheet, View } from 'react-native'; import { useAppTheme } from '@throwl/shared-theme'; import { NewGameScreenLayout } from '../NewGameScreenLayout'; +function GameModePills({ + buttons, + ...props +}: ComponentProps) { + const { colors, roundness } = useAppTheme(); + if (Platform.OS !== 'ios') { + return ; + } + + // Draw one rounded outline on iOS so adjacent native borders cannot bleed + // into the neighboring segment. + return ( + ({ + ...button, + style: styles.pillSegment, + }))} + /> + ); +} + export const GameModeScreen: FC = () => { const navigation = useNavigation< @@ -27,7 +53,7 @@ export const GameModeScreen: FC = () => { > - { if (mode === 'x01' || mode === 'doubles') { @@ -53,7 +79,7 @@ export const GameModeScreen: FC = () => { - { if (format === 'individual' || format === 'teams') { @@ -90,4 +116,13 @@ export const GameModeScreen: FC = () => { const styles = StyleSheet.create({ mode: { gap: 12, marginVertical: 16 }, format: { gap: 12 }, + pillOutline: { borderWidth: 1, overflow: 'hidden' }, + pillSegment: { + borderWidth: 0, + borderRadius: 0, + borderTopLeftRadius: 0, + borderTopRightRadius: 0, + borderBottomLeftRadius: 0, + borderBottomRightRadius: 0, + }, });