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

Conversation

olerichter00
Copy link
Contributor

@olerichter00 olerichter00 commented May 2, 2025

This PR resolves PBRW-713

Description

Dark Mode TextInput text color.

Before After
Simulator Screenshot - iPhone 16 - 2025-05-02 at 10 41 12 Simulator Screenshot - iPhone 16 - 2025-05-02 at 10 35 19
--- ---
Simulator Screenshot - iPhone 16 - 2025-05-02 at 10 41 01 Simulator Screenshot - iPhone 16 - 2025-05-02 at 10 39 43

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos at least on Android, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • fix Dark Mode TextInput text color (e.g. Conversations) - ole

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

@olerichter00 olerichter00 self-assigned this May 2, 2025
@olerichter00 olerichter00 requested review from Copilot, MounirDhahri and gkartalis and removed request for Copilot May 2, 2025 08:42
@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Cross-platform user-facing changes (fix Dark Mode TextInput text color (e.g. Conversations) - ole - olerichter00)

Generated by 🚫 dangerJS against ec54567

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates TextInput components to use a dark mode text color by utilizing the useColor hook. The changes ensure that text placed within TextInputs across various components displays correctly in dark mode.

  • Updated ExperimentFlagItem.tsx to apply dark mode text color in CustomInput.
  • Updated Composer.tsx to set TextInput text color for dark mode.
  • Updated AuctionResult.tsx to apply dark mode text color for improved readability.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/app/system/devTools/DevMenu/Components/ExperimentFlagItem.tsx Added useColor hook and applied dark mode text color in CustomInput.
src/app/Scenes/Inbox/Components/Conversations/Composer.tsx Applied dark mode text color in the inline TextInput styles.
src/app/Scenes/AuctionResult/AuctionResult.tsx Updated TextInput styles by including the dark mode text color.

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.

@@ -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.

@@ -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.

Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

LGTM! thanks

@olerichter00 olerichter00 merged commit bda0801 into main May 2, 2025
7 checks passed
@olerichter00 olerichter00 deleted the olerichter00/PBRW-713/dark-mode-textinput-text-color branch May 2, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants