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

Create submission consent screen (QR code flow) (EXPOSUREAPP-3676) #1712

Merged

Conversation

chiljamgossow
Copy link
Contributor

@chiljamgossow chiljamgossow commented Nov 24, 2020

Creates new screen for consent to submission of keys in QR code flow
Removes old info screen and dialog
Updates navigation
Link to data privacy screen
Move legal text

Still missing: correct icons -> moved to new ticket 3972

3676-submission-consent-screen

…e/3731-submission-consent-screen

# Conflicts:
#	Corona-Warn-App/src/main/res/layout/fragment_submission_qr_code_info.xml
#	Corona-Warn-App/src/main/res/values-bg/strings.xml
#	Corona-Warn-App/src/main/res/values-en/strings.xml
#	Corona-Warn-App/src/main/res/values-pl/strings.xml
#	Corona-Warn-App/src/main/res/values-ro/strings.xml
#	Corona-Warn-App/src/main/res/values-tr/strings.xml
#	Corona-Warn-App/src/main/res/values/strings.xml
@chiljamgossow chiljamgossow added the maintainers Tag pull requests created by maintainers label Nov 24, 2020
@chiljamgossow chiljamgossow added this to the 1.9.0 milestone Nov 24, 2020
@chiljamgossow chiljamgossow requested a review from a team November 24, 2020 14:25
@janetback
Copy link
Contributor

Hi @chiljamgossow - I am just wondering why this PR includes files for languages other than the source language German? These are normally update by deliveries from translation.

@chiljamgossow chiljamgossow changed the title Create submission consent screen QR Code (EXPOSUREAPP-3676) Create submission consent screen (QR code flow) (EXPOSUREAPP-3676) Nov 24, 2020
@chiljamgossow
Copy link
Contributor Author

Hi @chiljamgossow - I am just wondering why this PR includes files for languages other than the source language German? These are normally update by deliveries from translation.

Hi @janetback I deleted a screen and also removed the strings that are now unused.

@vaubaehn
Copy link
Contributor

For my taste looks nice in general.

@janetback and @SabineLoss : I would suggest to move the text "Die App kann nicht gleichzeitg mehrere Tests verwalten" up one icon/bullet point, directly following "Scannen Sie nur Ihren eigenen Test". (There should also be a "." behind "Test" for consistency.) With regard to content it maybe fits better there.
I also would suggest to change the wording of "Ihr Test kann nur einmal gescannt werden." to "Ihr Test kann nur ein einziges Mal gescannt werden." to emphasize even more the loss of the test retrieval after deleting the test from CWA.
What do you think?

Copy link
Contributor

@kolyaopahle kolyaopahle left a comment

Choose a reason for hiding this comment

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

Looks nice as far as i can see, some very minor nitpicks 👍

style="@style/buttonPrimary"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
android:text="@string/submission_positive_other_warning_button"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe rename the string resources so that they represent the usage place more accurately

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to submission_accept_button

android:layout_height="wrap_content"
android:text="@string/submission_positive_other_warning_button"
android:textAllCaps="true"
android:onClick="@{ () -> viewModel.onConsentButtonClick()}"
Copy link
Contributor

Choose a reason for hiding this comment

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

could we not inject the viewModel and instead just set the listener in fragment code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is possible. I decided to use data binding to keep the fragment clean

}

@Test
fun testBackPressButton() {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this actually the back button being tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for spotting this. I changed this.

@janetback
Copy link
Contributor

Hi @vaubaehn, thanks for your feedback. We will add the missing '.' and take your suggestions into account for future improvements.

@chiljamgossow - as discussed, could you please add the missing punctuation? Thanks.

@chiljamgossow
Copy link
Contributor Author

@chiljamgossow - as discussed, could you please add the missing punctuation? Thanks.

done

janetback
janetback previously approved these changes Nov 26, 2020
Copy link
Contributor

@janetback janetback left a comment

Choose a reason for hiding this comment

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

UA approved

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.viewModel = viewModel
binding.lifecycleOwner = this
Copy link
Contributor

Choose a reason for hiding this comment

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

binding.lifecycleOwner = this should be replaced with this.viewLifecycleOwner
(can lead to fragment issues e.g. while navigating)

It's also little bit redundant because you already use viewBindingLazy above.
So to avoid this bug either adjust the lifecycleOwner line or simply remove it ⛄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it. I missed that it is already applied.

@sonarcloud
Copy link

sonarcloud bot commented Nov 26, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

21.4% 21.4% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@BMItr BMItr left a comment

Choose a reason for hiding this comment

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

code lgtm

@vaubaehn
Copy link
Contributor

Hi @janetback , thanks for your kind reply. From the user's perspective, I also liked your approach from the later erased comment for its clarity, but full understanding that it's difficult to find the balance between wording and length, without breaking the layouts 😉 Thanks for your important contributions to this big project 👍 -> this goes also to @SabineLoss

@janetback
Copy link
Contributor

Hi @vaubaehn , yes, we are definitely keeping the proposal that I then erased - we are still hoping to be able to implement it at a slightly later date.
cc @SabineLoss

Copy link
Contributor

@janetback janetback left a comment

Choose a reason for hiding this comment

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

UA reviewed

@chiljamgossow chiljamgossow merged commit 8b3d236 into release/1.9.x Nov 26, 2020
@chiljamgossow chiljamgossow deleted the feature/3676-create-submission-consent-screen branch November 26, 2020 18:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants