Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment #1598

Closed
3 tasks done
vaubaehn opened this issue Nov 13, 2020 · 10 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working Fix 1.9 Fix is planned for release 1.9 mirrored-to-jira This item is also tracked internally in JIRA Solved Issue has been resolved. Fix is planned for a future release.

Comments

@vaubaehn
Copy link
Contributor

vaubaehn commented Nov 13, 2020

Avoid duplicates

  • Bug is not mentioned in the FAQ
  • Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
  • Bug is not already reported in another issue

Describe the bug

In the past days, CWA was fetching diagnosis keys from server in the background very soon after 0:00 UTC. Because the new DKs hadn't been deployed yet at that point in time, CWA was checking with old data from the day before... But this is a seperate issue (#1691).
To make sure to have a download of 'fresh' DKs, I deactivated Exposure Logging last night before sleep.
In the morning, I opened CWA, navigated to the fragment that allows for enabling Exposure Logging, enabled logging again, and then immediately navigated back to the home screen. Instead of a risk card showing "Daten werden heruntergeladen..." there was only a blank/white risk card. Tapping and holding the risk card switched the background of the card to light grey, and a white text "Daten werden heruntergeladen.." was visible. After releasing the finger, CWA switched to risk details screen, showing only a blank/white screen. Navigating back to the main screen showed again a white risk card. After the download was finished, the risk card updated automatically to a green card with white text "Prüfung..." (shouldn't the background be dark grey either?). After the DKs had been provided to ENF, the risk card updated automatically to the green card "Low Risk".
I guess, the background color was not set correctly, while the (white) text was visible.
I made some screenshots... see below.

Expected behaviour

The risk card "Daten werden heruntergeladen..." and the risk details fragment should have a dark grey background, like seen in @d4rken 's screenshots #1486 . According to #1486 , the risk card should probably also have a dark grey background while "Prüfing läuft...".

Steps to reproduce the issue

  1. Deactivate Exposure Logging before 0:00 UTC.
  2. After 0:00 UTC, open CWA, navigate to the fragment where you are able to activate Exposure logging.
  3. Enable Exposure Logging. Immediately navigate back to the main screen.
  4. See error:
    Screenshot_2020-11-13-08-00-27
  5. Tap and hold risk card:
    Screenshot_2020-11-13-08-00-51
  6. release finger, see CWA navigating to risk details:
    Screenshot_2020-11-13-08-00-56
  7. navigate back to main screen, wait for refresh of risk card:
    Screenshot_2020-11-13-08-01-15
  8. wait for refresh of risk card after DKs had been provided to ENF:
    Screenshot_2020-11-13-08-30-51

Technical details

  • Mobile device: LG-G4
  • Android version: 6,1
  • CWA; 1.6.0
  • ENF: 18204215000

Possible Fix

Make sure that for UI states "Daten werden heruntergeladen..." and "Prüfung läuft..:" the correct background color is set when navigating from any other fragment to main screen.

edit:

Probably the bug is here:
it's probably here

Looks like R.color.card_unknown has background color white, or RiskLevelConstants should be defined for "Daten werden heruntergeladen..." and "Prüfung läuft...".

edit2: Would maybe make sense to define RiskLevelConstants for "Daten werden heruntergeladen..." und "Prüfung läuft...": Looks like while download RiskLevelConstants is unknown, and while "Prüfung läuft..." RiskLevelConstants is already "Low risk".

edit3: Digging some more, for me seems that R.color.card_unknown should point to color scheme <color name="colorSemanticNeutralRisk">#5D6E80</color>, but obviously <color name="colorSemanticUnknownRisk">#FFFFFF</color> is used:

don't look

See also here for definition of RiskLevelConstants:
save your time not looking here

Additional context

Feel free to hide above screenshots for better readability of this issue, after mirroring to Jira.


Related PR #1751.
Overall PR: #1699

Internal Tracking ID: EXPOSUREAPP-3834

@vaubaehn vaubaehn added the bug Something isn't working label Nov 13, 2020
@vaubaehn vaubaehn changed the title Viewmodel- or Layout-Bug in Fragment Risk Details/Fragment Home for UI states "Daten werden heruntergeladen.." and "Prüfung läuft..." TracingCard for UI states "Daten werden heruntergeladen.." and "Prüfung läuft..." not readable - white background color. Bug in de.rki.coronawarnapp.ui.tracing.card.getRiskInfoContainerBackgroundTint() ? Nov 13, 2020
@vaubaehn vaubaehn changed the title TracingCard for UI states "Daten werden heruntergeladen.." and "Prüfung läuft..." not readable - white background color. Bug in de.rki.coronawarnapp.ui.tracing.card.getRiskInfoContainerBackgroundTint() ? RiskLevelConstants are not properly defined for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card (white background). See de.rki.coronawarnapp.ui.tracing.card.getRiskInfoContainerBackgroundTint() Nov 13, 2020
@vaubaehn vaubaehn changed the title RiskLevelConstants are not properly defined for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card (white background). See de.rki.coronawarnapp.ui.tracing.card.getRiskInfoContainerBackgroundTint() Layout-Bug for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card (white background) Nov 16, 2020
@vaubaehn
Copy link
Contributor Author

vaubaehn commented Nov 16, 2020

The other day I was deactivating exposure logging again, and then in the next morning re-activating it from insinde Google's COVID-19-Notifications page, and from there navigating to CWA's main screen. This time the risk card had the expected dark grey background color when downloading diagnosis keys:

Screenshot_2020-11-15-02-11-58

This makes me think, that there is a problem with inhereting the color schemes from one layout to the other, rather then having a problem with defining the right color scheme for the right UI state.

So, maybe it's worth to have another look into https://github.com/corona-warn-app/cwa-app-android/blob/main/Corona-Warn-App/src/main/res/layout/include_risk_card_content.xml

@vaubaehn
Copy link
Contributor Author

Hi @SamuraiKek , I found your PR #1615 targetted for 1.8.0. Looks like, as a side effect the bug reported here could be solved. However, will there be a chance to fix #1598 before 1.8.0? According to Google Play Store reviews, there is a number of users left behind a bit irritated of having a white risk card/white risk details fragment.
Kind regards, v.

@vaubaehn vaubaehn changed the title Layout-Bug for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card (white background) Layout-Bug for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card/risk details fragment (white text color with white background tint) Nov 16, 2020
@SamuraiKek
Copy link
Contributor

Hi @SamuraiKek , I found your PR #1615 targetted for 1.8.0. Looks like, as a side effect the bug reported here could be solved. However, will there be a chance to fix #1598 before 1.8.0? According to Google Play Store reviews, there is a number of users left behind a bit irritated of having a white risk card/white risk details fragment.
Kind regards, v.

Hi @vaubaehn, yes, it looks like my PR could potentially fix this issue as well, although I don't believe there's going to be a fix for it before 1.8.0.

@vaubaehn
Copy link
Contributor Author

@SamuraiKek
Hi Alex, thanks for your reply. Ok, then we'll wait for 1.8.0. Likely there is an easy work around for affected users with a (stale?) white risk card/risk details fragment, i.e. simply navigating to a different fragment and back. Will try out tomorrow if I won't forget to disable exposure logging tonight 😉
Hope refactoring will be easy going for you - looks like a quite long list in #1615 :)
Best wishes, v.

@heinezen heinezen changed the title Layout-Bug for TracingCard UI states "Daten werden heruntergeladen.." and "Prüfung läuft...", resulting in not readable risk card/risk details fragment (white text color with white background tint) Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment Nov 17, 2020
@heinezen
Copy link
Member

Hey @vaubaehn ,

I've mirrored this issue to Jira (ticket ID: EXPOSUREAPP-3834) now so that it gets properly tracked. We will see what we can do about it before the next release. As always, we'll notify you here when a fix is available.

Thanks for the report,
CH


Corona-Warn-App Open Source Team

@heinezen heinezen added the mirrored-to-jira This item is also tracked internally in JIRA label Nov 17, 2020
@vaubaehn
Copy link
Contributor Author

Some additional information:
I tested the issue some more times. By testing I found out, that the risk details fragment (the whole screen) does not have white text on white background, but seems to be completely empty. This is, because there was also no element for closing the screen to navigate back to main screen (I tried to close "blindly" by tapping into the left up corner with no effect). Also, there is no text for "Verhaltensregeln" visible which should be displayed in any case.
Additionally, once I was able to have a different navigation back from the "tracing settings fragment" to the main screen (I accidently clicked something else, but forgot what it was...). Back on the main screen, data were download ("Daten werden heruntergeladen...") with completely white risk card, but when I tapped into the risk card, I was navigated to the risk details fragment, now displaying the "Risiko-Ermittlung gestoppt" information and below the "Verhaltensregeln". After the download finished, the risk details fragment automatically changed to the "Prüfung läuft..." elements.
So, looks like there are a bunch of underlying problems in this issue. But they might probably WIP already?

@d4rken
Copy link
Member

d4rken commented Nov 28, 2020

Thanks for the detailed description.

So, looks like there are a bunch of underlying problems in this issue. But they might probably WIP already?

The risk card has changed over the various releases, getting new states with each, making the state matrix more complex with each step. I'm working on a complete overhaul:

@d4rken d4rken assigned d4rken and unassigned JoachimFritsch Nov 28, 2020
@dsarkar
Copy link
Member

dsarkar commented Dec 11, 2020

Related PR #1751.


Corona-Warn-App Open Source Team

@dsarkar dsarkar changed the title Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment [Fix 1.9 or 1.8] Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment Dec 14, 2020
@dsarkar dsarkar changed the title [Fix 1.9 or 1.8] Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment [Fix 1.9] Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment Dec 14, 2020
@dsarkar
Copy link
Member

dsarkar commented Dec 14, 2020

Overall PR: #1699


Corona-Warn-App Open Source Team

@dsarkar dsarkar added Fix 1.9 Fix is planned for release 1.9 Solved Issue has been resolved. Fix is planned for a future release. labels Dec 14, 2020
@dsarkar dsarkar changed the title [Fix 1.9] Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment Layout-Bug for TracingCard UI states resulting in not readable risk card/risk details fragment Dec 14, 2020
@dsarkar
Copy link
Member

dsarkar commented Dec 22, 2020

Hi @vaubaehn and community, Thank you for your contributions. This issue has been fixed. We will close this ticket now. Many thanks, best regards. DS


Corona-Warn-App Open Source Team

@dsarkar dsarkar closed this as completed Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Fix 1.9 Fix is planned for release 1.9 mirrored-to-jira This item is also tracked internally in JIRA Solved Issue has been resolved. Fix is planned for a future release.
Projects
None yet
Development

No branches or pull requests

6 participants