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

Move AppColor to DesignSystem #24227

Merged
merged 4 commits into from
Mar 19, 2025
Merged

Conversation

kean
Copy link
Contributor

@kean kean commented Mar 16, 2025

This PR extracts AppColors.swift - another file used across multiple targets - to the existing DesignSystem module.

DesignSystem

Previously, the thinking was to deprecate it, but I suggest evolving it to ensure it properly represents the WordPress Design System.

I added DesignSystem as a dependency to WordPressUI and re-exported its APIs, so you need to import only WordPressUI – similar to UIKit.

To test: smoke test that the apps run and have correct tint colors.

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean added the General label Mar 16, 2025
@kean kean added this to the 25.9 milestone Mar 16, 2025
@kean kean force-pushed the task/move-app-color-to-design-system branch from b81b93d to 8a517d9 Compare March 16, 2025 23:19
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 16, 2025

4 Warnings
⚠️ Modules/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages as appropriate to your project setup (e.g. in Xcode or by running swift package resolve).
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ This PR is assigned to the milestone 25.9. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@kean kean force-pushed the task/move-app-color-to-design-system branch 2 times, most recently from 56b38c6 to 2dabbc5 Compare March 16, 2025 23:23
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 16, 2025

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr24227-6f5331a
Version25.8
Bundle IDcom.jetpack.alpha
Commit6f5331a
App Center Buildjetpack-installable-builds #10759
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 16, 2025

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr24227-6f5331a
Version25.8
Bundle IDorg.wordpress.alpha
Commit6f5331a
App Center BuildWPiOS - One-Offs #11731
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean marked this pull request as draft March 17, 2025 15:04
@kean kean mentioned this pull request Mar 17, 2025
14 tasks
@kean kean force-pushed the task/move-app-color-to-design-system branch from 2dabbc5 to ff23ec8 Compare March 18, 2025 17:00
@kean kean force-pushed the task/move-app-color-to-design-system branch from ff23ec8 to 358e1ae Compare March 18, 2025 17:24
"target" : {
"containerPath" : "container:..\/Modules",
"identifier" : "DesignSystemTests",
"name" : "DesignSystemTests"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabled this for now as running it from Xcode targets messed up module bundles.

@kean kean requested a review from jkmassel March 18, 2025 17:25
@kean kean marked this pull request as ready for review March 18, 2025 17:25
@kean kean requested review from mokagio and crazytonyli and removed request for jkmassel March 18, 2025 17:26
@@ -7814,6 +7809,9 @@
sk,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
packageReferences = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems Apple changed how you add local packages at some point. I updated it using the latest mechanism. It now seems to do a better job recognizing when something in the local modules changes.


extension AppBrand {
static var current: AppBrand {
// TODO: remove this when unit tests not longer rely on `BuildSettings.current`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, I had to add this as there are too many unit tests that test UI components in the app.

@kean kean force-pushed the task/move-app-color-to-design-system branch from 24bae9e to a9e7a32 Compare March 18, 2025 21:11
@kean kean enabled auto-merge March 18, 2025 21:30
@kean kean added this pull request to the merge queue Mar 19, 2025
Merged via the queue into trunk with commit 25aac40 Mar 19, 2025
25 checks passed
@kean kean deleted the task/move-app-color-to-design-system branch March 19, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants