Skip to content
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

Fix pencil icon color to work both on light and dark mode #13316

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

hafizrahman
Copy link
Contributor

@hafizrahman hafizrahman commented Jan 15, 2025

Description

When beta testing 21.4, @itsmeichigo reported this issue where the pencil icon for editing status in Order Details is hard to see:

This PR sets the icon to use color_primary, which is commonly used in other tappable icons in the app. The result is like this:

Additional discussion

The affected icon is actually used in different places in the app:

Screenshot 2025-01-15 at 20 26 24

However, we're not hearing about color issue in dark mode in other places where this icon is used. This is because whenever it is used, either in Compose or XML, its tint is also set separately there (e.g: with app:iconTint="@color/color_primary" or tint = MaterialTheme.colors.primary).

With the change introduced in this PR, technically, those separate color settings are not needed anymore and can be deleted. However, deleting them means it will require us extra time to check each individual area that uses it. This will have to be done not just during PR review, but also later during beta testing.

Thinking about that trade-off, I decided not to remove the individual setting and just leave them be, to save us time.

Steps to reproduce

Build app, then edit an Order in Dark Mode. Ensure the pencil icon next to the Order status is visible in purple color, similar to screenshot above.

Testing information

The tests that have been performed

Listed above.

Images/gif

Added above.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@hafizrahman hafizrahman added this to the 21.5 milestone Jan 15, 2025
@hafizrahman hafizrahman added the category: design Layout and style elements in the UI or user interface, including color and animations. label Jan 15, 2025
@hafizrahman hafizrahman marked this pull request as ready for review January 15, 2025 13:32
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit20e422d
Direct Downloadwoocommerce-wear-prototype-build-pr13316-20e422d.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit20e422d
Direct Downloadwoocommerce-prototype-build-pr13316-20e422d.apk

@irfano irfano self-assigned this Jan 15, 2025
Copy link
Contributor

@irfano irfano left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻

@irfano irfano merged commit a938c73 into trunk Jan 15, 2025
20 of 21 checks passed
@irfano irfano deleted the fix/edit-icon-dark-mode branch January 15, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: design Layout and style elements in the UI or user interface, including color and animations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants