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: resolve custom colors [WPB-11475] #3656

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Nov 22, 2024

StoryWPB-11475 Resolve custom colors in Android color scheme


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

We have a lot of custom colors that are not included in the design documentation.

Solutions

Removed all unneeded custom colors from our color scheme and replaced them with the ones that are included in the design documentation.
Added "surface container" colors, they are not yet included in the designs but they are now required by the material 3 and they helped to make colors work as in designs we have too many different background colors (material3 doesn't use backgroundVariant for instance so it's matched by using surfaceContainerLow for instance).
Fixed some previews and added new ones.
Unified elements like checkboxes in the app.
Added new "fixed" color scheme for colors that are always the same no matter which mode is used, idea and suggested implementation implementation on which it was based:
https://m3.material.io/styles/color/roles#26b6a882-064d-4668-b096-c51142477850
https://developer.android.com/reference/kotlin/androidx/compose/material3/ColorScheme
For elements which always are in the same one mode, like call tiles (always dark), there are new extension functions darkColorsScheme and lightColorsScheme to use only the colors from this particular mode instead of them being changed depending on currently used mode on the phone, as it's the more practical approach than duplicating the same colors in both specific mode's scheme and fixed color scheme.

Testing

How to Test

Just open the app and check if the colors are right.

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Nov 22, 2024
Copy link

Ups 🫰🟨

This PR is too big. Please try to break it up into smaller PRs.

@@ -115,6 +115,10 @@ android {
getByName("androidTest") {
java.srcDirs("src/androidTest/kotlin")
}
create("screenshotTest") {
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's to make message previews to be properly rendered in Android Studio, as they are now moved to screenshotTest.

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.04%. Comparing base (c911271) to head (5e0b11c).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3656   +/-   ##
========================================
  Coverage    46.04%   46.04%           
========================================
  Files          472      471    -1     
  Lines        16108    16107    -1     
  Branches      2666     2666           
========================================
  Hits          7417     7417           
+ Misses        7917     7916    -1     
  Partials       774      774           
Files with missing lines Coverage Δ
...g/ongoing/participantsview/FloatingSelfUserTile.kt 0.00% <ø> (ø)
...alling/ongoing/participantsview/ParticipantTile.kt 0.00% <ø> (ø)
...g/ongoing/participantsview/VerticalCallingPager.kt 0.00% <ø> (ø)
...going/participantsview/gridview/CallingGridView.kt 0.00% <ø> (ø)
.../kotlin/com/wire/android/ui/edit/ReactionOption.kt 0.00% <ø> (ø)
.../ui/home/conversations/media/ImageAssetsContent.kt 0.00% <ø> (ø)
...oid/ui/home/conversations/messages/ReactionPill.kt 0.00% <ø> (ø)
...ions/model/messagetypes/asset/AssetMessageTypes.kt 0.00% <ø> (ø)
...tionslist/filter/ConversationFilterSheetContent.kt 0.00% <ø> (ø)
.../ui/home/messagecomposer/EnabledMessageComposer.kt 0.00% <ø> (ø)
... and 4 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c911271...5e0b11c. Read the comment docs.

---- 🚨 Try these New Features:

Copy link
Contributor

Built wire-android-staging-compat-pr-3656.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3656.apk is available for download

@saleniuk saleniuk requested review from Garzas, a team, typfel, alexandreferris, MohamadJaara and ohassine and removed request for a team November 22, 2024 15:52
…esolve-custom-colors

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/details/GroupConversationDetailsScreen.kt
#	app/src/main/kotlin/com/wire/android/ui/userprofile/self/CreateTeamInfoCard.kt
Copy link

sonarcloud bot commented Nov 26, 2024

Copy link
Contributor

Built wire-android-staging-compat-pr-3656.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3656.apk is available for download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants