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

Merged
merged 8 commits into from
Nov 28, 2024
Merged

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.08%. Comparing base (8a60716) to head (1153318).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3656   +/-   ##
========================================
  Coverage    46.08%   46.08%           
========================================
  Files          473      472    -1     
  Lines        16150    16149    -1     
  Branches      2675     2675           
========================================
  Hits          7443     7443           
+ Misses        7929     7928    -1     
  Partials       778      778           
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 8a60716...1153318. Read the comment docs.

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

Copy link

sonarcloud bot commented Nov 28, 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

Copy link
Contributor

@Garzas Garzas left a comment

Choose a reason for hiding this comment

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

Great cleanup 👏

@saleniuk saleniuk added this pull request to the merge queue Nov 28, 2024
Merged via the queue into develop with commit c2a2d9a Nov 28, 2024
11 of 12 checks passed
@saleniuk saleniuk deleted the fix/resolve-custom-colors branch November 28, 2024 16:05
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.

4 participants