Merge pull request #3633 from element-hq/feature/bma/qrCodeNotice
QrCode intro screen: add subtitle and fix button wording #3632
This commit is contained in:
@@ -30,7 +30,6 @@ import io.element.android.libraries.designsystem.theme.components.Button
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.utils.annotatedTextWithBold
|
||||
import io.element.android.libraries.permissions.api.PermissionsView
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
|
||||
@Composable
|
||||
@@ -51,6 +50,7 @@ fun QrCodeIntroView(
|
||||
onBackClick = onBackClick,
|
||||
iconStyle = BigIcon.Style.Default(CompoundIcons.Computer()),
|
||||
title = stringResource(id = R.string.screen_qr_code_login_initial_state_title, state.desktopAppName),
|
||||
subTitle = stringResource(id = R.string.screen_qr_code_login_initial_state_subtitle),
|
||||
content = { Content(state = state) },
|
||||
buttons = { Buttons(state = state) }
|
||||
)
|
||||
@@ -87,7 +87,7 @@ private fun ColumnScope.Buttons(
|
||||
state: QrCodeIntroState,
|
||||
) {
|
||||
Button(
|
||||
text = stringResource(id = CommonStrings.action_continue),
|
||||
text = stringResource(id = R.string.screen_qr_code_login_initial_state_button_title),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = {
|
||||
state.eventSink.invoke(QrCodeIntroEvents.Continue)
|
||||
|
||||
@@ -60,6 +60,7 @@ Try signing in manually, or scan the QR code with another device."</string>
|
||||
<string name="screen_qr_code_login_initial_state_item_3">"Select %1$s"</string>
|
||||
<string name="screen_qr_code_login_initial_state_item_3_action">"“Link new device”"</string>
|
||||
<string name="screen_qr_code_login_initial_state_item_4">"Scan the QR code with this device"</string>
|
||||
<string name="screen_qr_code_login_initial_state_subtitle">"Only available if your account provider supports it."</string>
|
||||
<string name="screen_qr_code_login_initial_state_title">"Open %1$s on another device to get the QR code"</string>
|
||||
<string name="screen_qr_code_login_invalid_scan_state_description">"Use the QR code shown on the other device."</string>
|
||||
<string name="screen_qr_code_login_invalid_scan_state_retry_button">"Try again"</string>
|
||||
|
||||
@@ -11,7 +11,7 @@ import androidx.activity.ComponentActivity
|
||||
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import io.element.android.features.login.impl.R
|
||||
import io.element.android.tests.testutils.EnsureNeverCalled
|
||||
import io.element.android.tests.testutils.EventsRecorder
|
||||
import io.element.android.tests.testutils.clickOn
|
||||
@@ -61,12 +61,12 @@ class QrCodeIntroViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on continue button clicked - emits the Continue event`() {
|
||||
fun `on submit button clicked - emits the Continue event`() {
|
||||
val eventRecorder = EventsRecorder<QrCodeIntroEvents>()
|
||||
rule.setQrCodeIntroView(
|
||||
state = aQrCodeIntroState(eventSink = eventRecorder),
|
||||
)
|
||||
rule.clickOn(CommonStrings.action_continue)
|
||||
rule.clickOn(R.string.screen_qr_code_login_initial_state_button_title)
|
||||
eventRecorder.assertSingle(QrCodeIntroEvents.Continue)
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user