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

[Woo POS] [Design System] Create a color palette for POS and corresponding SwiftUI colors #15063

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

jaclync
Copy link
Contributor

@jaclync jaclync commented Feb 6, 2025

Part of #15061

Description

This pull request introduces a new color palette for POS based on the Design System table 1qcjzXitBHU7xPnpCOWnNM-fi-19_19221 / color roles 1qcjzXitBHU7xPnpCOWnNM-fi-437_20681. The changes include the addition of new color definitions in Swift and corresponding color assets as an Xcode color asset catalog. The new colors are not used in the code yet, they will replace existing POS colors in future PRs to keep reasonably sized PRs.

I decided to go with a color palette instead of all code, for easier visualization of both light and dark mode colors and because these colors are not meant to be dynamic (at least for now). We can easily compare the colors with the design system and update them in the future.

New color definitions:

New color assets:

Steps to reproduce

I'd recommend testing the PR by reviewing the POSColorPalette color catalog, where most of the diffs are from. You can compare each color with the corresponding one in 1qcjzXitBHU7xPnpCOWnNM-fi-19_19221 / color roles 1qcjzXitBHU7xPnpCOWnNM-fi-437_20681 (the names in the catalog are lowerCamelCase but I'm open to changing it if it helps with readability). I also named the colors with a pos prefix to avoid potential conflicts with future color palettes.

Testing information

If you'd like to try any of the new colors, feel free to try returning .posTextPrimary for posPrimaryText color for example.

Screenshots

Screenshot 2025-02-06 at 10 56 02 AM
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

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 all devices (phone/tablet) and no regressions are added.

@jaclync jaclync added type: task An internally driven task. feature: POS labels Feb 6, 2025
@jaclync jaclync added this to the 21.8 milestone Feb 6, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Feb 6, 2025

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Feb 6, 2025

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

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr15063-877d6b1
Version21.6
Bundle IDcom.automattic.alpha.woocommerce
Commit877d6b1
App Center BuildWooCommerce - Prototype Builds #12818
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

…r future color palettes in the main bundle. Update color code.
@jaclync jaclync changed the title [Woo POS] [Design system] Create a color palette for POS and corresponding SwiftUI colors [Woo POS] [Design System] Create a color palette for POS and corresponding SwiftUI colors Feb 6, 2025
@jaclync jaclync marked this pull request as ready for review February 6, 2025 04:40
@iamgabrielma iamgabrielma self-assigned this Feb 6, 2025
Copy link
Contributor

@iamgabrielma iamgabrielma left a comment

Choose a reason for hiding this comment

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

LGTM! 🚢

@iamgabrielma
Copy link
Contributor

Great change! Much much easier to work with colors with the palette rather than code-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: POS type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants