Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/components/Picker/BasePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import useScrollContext from '@hooks/useScrollContext';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {isMobile} from '@libs/Browser';
import getOperatingSystem from '@libs/getOperatingSystem';
import CONST from '@src/CONST';
import getAccessibilityLabelConfig from './getAccessibilityLabelConfig';
import type {BasePickerProps} from './types';
Expand Down Expand Up @@ -145,16 +144,7 @@ function BasePicker<TPickerValue>({
},
}));

/**
* We pass light text on Android, since Android Native alerts have a dark background in all themes for now.
*/
const itemColor = useMemo(() => {
if (getOperatingSystem() === CONST.OS.ANDROID) {
return theme.textLight;
}

return theme.text;
}, [theme]);
const itemColor = theme.text;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve light text for Android picker dialog items

This change makes Android picker options use theme.text for every theme, but the Android dialog background is hardcoded dark (@color/card_highlight_bg via android/app/src/main/res/values/styles.xml and android/app/src/main/res/values/colors.xml). In Light and Light Contrast themes, theme.text is #002E22 (src/styles/theme/themes/light.ts), which creates very low contrast against that dark dialog background, making option labels difficult to read. Before this commit, Android used theme.textLight, which avoided this regression for users in light themes opening any BasePicker on Android.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BasePicker is only used in signin page which is always dark theme, so it's fine.


// Windows will reuse the text color of the select for each one of the options
// so we might need to color accordingly so it doesn't blend with the background.
Expand Down
Loading