Skip to content

Conversation

@Garzas
Copy link
Contributor

@Garzas Garzas commented Nov 4, 2025

EpicWPB-21145 Adjust dark mode 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

This PR introduces dynamic accent color handling and dark mode improvements across the theming system.
Previously, accent colors were resolved manually per component (e.g. via getOrDefault), and UI elements like message bubbles didn’t adapt correctly between light and dark themes.

Causes

  • The WireColorSchemeTypes provided static base schemes (LightWireColorScheme, DarkWireColorScheme) without dynamic accent mapping.
  • Accent resolution had to be done manually in composables, making theme management inconsistent and error-prone.
  • WireColorScheme didn’t yet handle dark/light-specific accent shades for elements like message bubbles.
  • The Accent enum lacked a consistent mapping to color swatches.

Solutions

  • Introduced a new Accent & Tone system:

    • Added Tone enum (T50–T900) for shade intensity.
    • Added Shades and AccentSwatch models for light/dark accent palettes.
    • Implemented Accent.asSwatch() to resolve the correct palette per theme mode.
  • Enabled dynamic accent application in WireTheme:

    • Added LocalWireAccent for providing accent context.
    • WireTheme now applies accents via withAccent(accent) using WireColorScheme.copy().
    • Accent changes automatically trigger recomposition across MaterialTheme components.
  • Updated WireColorScheme:

    • Added accent-based colors for self and other message bubbles.
    • Refined tone mapping for primary, highlight, focus, and status colors (error, warning, positive).
  • Improved dark mode conversation UI:

    • Adjusted bubble contrast for better readability.
    • Unified accent behavior and tone consistency in chat components.
accent_color_theme.mp4

@Garzas Garzas self-assigned this Nov 4, 2025
@pull-request-size
Copy link

Ups 🫰🟨

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

@Garzas Garzas changed the title feat: add dynamic accent color system and dark mode improvements [] feat: add dynamic accent color system and dark mode improvements [WPB-21145] Nov 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

@Garzas looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
67c823879b595c4337255e7d0f9b3df5007c4785 5e4076c2a578bb183c10b8395d4fc65e2404a9ec

Is this intentional?

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.24%. Comparing base (40603f9) to head (f518e19).

Files with missing lines Patch % Lines
...n/com/wire/android/ui/markdown/MarkdownComposer.kt 0.00% 2 Missing ⚠️
...in/kotlin/com/wire/android/ui/markdown/NodeData.kt 0.00% 2 Missing ⚠️
...tlin/com/wire/android/ui/markdown/MarkdownTable.kt 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (72.22%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4393      +/-   ##
===========================================
+ Coverage    47.20%   47.24%   +0.04%     
===========================================
  Files          530      530              
  Lines        17597    17607      +10     
  Branches      2987     2986       -1     
===========================================
+ Hits          8306     8318      +12     
+ Misses        8403     8401       -2     
  Partials       888      888              
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <ø> (ø)
...otlin/com/wire/android/ui/WireActivityViewModel.kt 75.08% <100.00%> (+1.04%) ⬆️
...id/ui/home/conversations/messages/QuotedMessage.kt 0.00% <ø> (ø)
...oid/ui/home/conversations/messages/ReactionPill.kt 0.00% <ø> (ø)
...i/home/conversations/messages/item/MessageStyle.kt 0.00% <ø> (ø)
...ndroid/ui/home/conversations/model/MessageTypes.kt 80.95% <ø> (ø)
...tions/model/messagetypes/audio/AudioMessageType.kt 0.00% <ø> (ø)
...ersations/model/messagetypes/video/VideoMessage.kt 0.00% <ø> (ø)
...tlin/com/wire/android/ui/markdown/MarkdownTable.kt 0.00% <0.00%> (ø)
...n/com/wire/android/ui/markdown/MarkdownComposer.kt 0.00% <0.00%> (ø)
... and 1 more

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 40603f9...f518e19. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

LocalActivity provides this
) {
WireTheme {
WireTheme(accent = viewModel.globalAppState.userAccent) {
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻 LGTM

@pull-request-size pull-request-size bot added size/L and removed size/XL labels Nov 4, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

@Garzas Garzas added this pull request to the merge queue Nov 4, 2025
Merged via the queue into develop with commit d7becd9 Nov 4, 2025
16 of 17 checks passed
@Garzas Garzas deleted the feat/dynamic-accent-theme branch November 4, 2025 16:38
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