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

Always follow the desired theme for Pin, Incoming Call and Element Call screens #3165

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 8, 2024

Content

Fix several issue around theming: Pin and Incoming call was not using the application setting for theme.
ElementCall was reading the current theme but before it was set.

Motivation and context

Dark theme everywhere when selected manually by the user or by following the system setting.

Closes #3153

Screenshots / GIFs

image

Tests

  • Set dark theme
  • Start a call
  • Observe that we now have a dark Element Call rendering.
  • Set up PIN code
  • Put the app to bg then to fg
  • Now: dark screen to enter pin code. Previously: light version
  • Same for incoming call screen.

I was confused by the icon change in the screenshot at #3118 , but now the icons are always the same, which is also a bit confusing. But this is on the web part.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty added the PR-Bugfix For bug fix label Jul 8, 2024
@bmarty bmarty requested a review from a team as a code owner July 8, 2024 16:39
@bmarty bmarty requested review from jmartinesp and removed request for a team July 8, 2024 16:39
Copy link
Contributor

github-actions bot commented Jul 8, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/2FX9LN

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 8, 2024
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 71.64179% with 19 lines in your changes missing coverage. Please review.

Project coverage is 76.11%. Comparing base (b0c9091) to head (bb5ae89).

Files Patch % Lines
...id/libraries/designsystem/theme/ElementThemeApp.kt 0.00% 7 Missing ⚠️
...roid/features/call/impl/ui/IncomingCallActivity.kt 0.00% 6 Missing ⚠️
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 2 Missing ⚠️
...ckscreen/impl/unlock/activity/PinUnlockActivity.kt 0.00% 2 Missing ⚠️
...c/main/kotlin/io/element/android/x/MainActivity.kt 0.00% 1 Missing ⚠️
...ndroid/features/call/impl/ui/IncomingCallScreen.kt 97.95% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3165   +/-   ##
========================================
  Coverage    76.11%   76.11%           
========================================
  Files         1640     1641    +1     
  Lines        38622    38622           
  Branches      7469     7471    +2     
========================================
+ Hits         29396    29397    +1     
  Misses        5333     5333           
+ Partials      3893     3892    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@bmarty
Copy link
Member Author

bmarty commented Jul 9, 2024

@jmartinesp I have added another commit, can you double check please?

Also I have found an issue about assets stored in -nightly resource folder, this may be handled in a separate issue: #3168

*/
@Composable
fun ElementThemeApp(
appPreferencesStore: AppPreferencesStore,
Copy link
Member

Choose a reason for hiding this comment

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

Having the design system library depending on the preferences one is a bit weird to be honest. Maybe this should be in a separate module that depends on both? Although that also sounds like an overkill.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's not a big deal to me, and it's better than duplicated code. Also in the future (EXE) it's better to centralize where the application theme is configured.

Copy link

sonarqubecloud bot commented Jul 9, 2024

@bmarty bmarty merged commit 23ac85f into develop Jul 9, 2024
25 of 26 checks passed
@bmarty bmarty deleted the feature/bma/realDarkTheme branch July 9, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element Call: Still not following the app theme.
2 participants