Skip to content

fix: Dark Mode TextInput text color #12037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/app/Scenes/AuctionResult/AuctionResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Separator,
Spacer,
Text,
useColor,
useSpace,
useTheme,
} from "@artsy/palette-mobile"
Expand Down Expand Up @@ -48,8 +49,10 @@ interface Props {
export const AuctionResult: React.FC<Props> = (props) => {
const artist = useFragment(artistFragment, props.artist)
const auctionResult = useFragment(auctionResultFragment, props.auctionResult)

const navigation = useNavigation<NavigationProp<AuthenticatedRoutesParams, "AuctionResult">>()

const color = useColor()
const { theme } = useTheme()

const tracking = useTracking()
Expand Down Expand Up @@ -85,6 +88,7 @@ export const AuctionResult: React.FC<Props> = (props) => {
multiline
scrollEnabled={false}
style={{
color: color("mono100"),
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

[nitpick] To reduce duplicated code, consider defining a common style for TextInput elements that incorporates the dark mode text color, which can then be reused across components.

Copilot uses AI. Check for mistakes.

fontFamily: theme.fonts.sans.regular,
fontSize: 13, // stands for xs
lineHeight: 21,
Expand Down
1 change: 1 addition & 0 deletions src/app/Scenes/Inbox/Components/Conversations/Composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default class Composer extends React.Component<Props, State> {
{({ color }) => {
// The TextInput loses its isFocused() callback as a styled component
const inputStyles = {
color: color("mono100"),
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider centralizing the TextInput styles (such as the dark mode color) into a shared style utility to enhance consistency and facilitate future modifications.

Copilot uses AI. Check for mistakes.

flex: 1,
fontSize: 13,
paddingLeft: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Pill,
Spacer,
Text,
useColor,
useSpace,
} from "@artsy/palette-mobile"
import Clipboard from "@react-native-clipboard/clipboard"
Expand Down Expand Up @@ -291,12 +292,15 @@ const CustomInput: React.FC<{
value: string | undefined
onChangeText: (text: string) => void
}> = ({ value, onChangeText }) => {
const color = useColor()

return (
<TextInput
value={value}
onChangeText={onChangeText}
autoCapitalize="none"
style={{
color: color("mono100"),
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider extracting the shared TextInput style properties (including dark mode color) into a common style or component to improve maintainability and reduce duplication.

Copilot uses AI. Check for mistakes.

borderColor: "gray",
borderWidth: 1,
height: 45,
Expand Down