Skip to content

Conversation

@dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Sep 10, 2025

Tip

Review each commit individually to simplify comprehending the changes.

Description

  • Relocate ApplicationPasswordReauthenticateDialogPreview to fix Jetpack
    Compose preview
  • Extract ApplicationPasswordDialog for Jetpack Compose to preview actual UI
    composition rather than duplicate
  • Add ApplicationPasswordDialog dismiss button to communicate ability to
    dismiss the dialog
  • Use consistent punctuation for descriptions with multiple sentences

Testing instructions

Jetpack Compose preview images below showcase the updated visuals. Functional testing
can be performed by following the testing plan outlined in either of the
following:

Default Dark mode Loading
default dark-mode loading

Remove from abstract class to fix Jetpack Compose preview error: "render
error."
Preview the actual UI code used by the app, rather than a copy of the
dialog composition.
Communicate the dialog may be dismissed.
While Material's guidlines state to avoid unnecessary punctuation, all
examples that have one more than one sentence use punctuation for all
sentences.
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 10, 2025

1 Warning
⚠️ strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.

Generated by 🚫 Danger

@sonarqubecloud
Copy link

@wpmobilebot
Copy link
Contributor

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr22196-fe69565
Commitfe69565
Direct Downloadjetpack-prototype-build-pr22196-fe69565.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr22196-fe69565
Commitfe69565
Direct Downloadwordpress-prototype-build-pr22196-fe69565.apk
Note: Google Login is not supported on these builds.

@dcalhoun dcalhoun marked this pull request as ready for review September 10, 2025 15:07
Comment on lines +71 to +76
val isLoading = viewModel.isLoading.collectAsState()
ApplicationPasswordDialog(
title = stringResource(getTitleResource()),
description = getDescriptionString(),
buttonText = getButtonTextResource(),
isLoading = isLoading.value,
Copy link
Member Author

Choose a reason for hiding this comment

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

Hoisted ViewModel to simplify Jetpack Compose component arguments and preview.

Comment on lines -142 to -145
private fun ApplicationPasswordReauthenticateDialogPreviewContent() {
val isLoading = remember { mutableStateOf(false) }

AlertDialog(
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced explicit "preview" component with preview of the actual UI code used by the application.

<string name="application_password_not_supported_error" a8c-src-lib="module:login">The provided site does not support Application Password authentication.</string>
<string name="application_password_invalid">Invalid Application Password</string>
<string name="application_password_invalid_description">Your application password no longer exists. Please sign in again to create a new application password </string>
<string name="application_password_invalid_description">Your application password no longer exists. Please sign in again to create a new application password.</string>
Copy link
Member Author

Choose a reason for hiding this comment

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

While Material guidelines suggest avoiding unnecessary punctuation, all examples with multiple sentences punctuate all sentences.

@dcalhoun dcalhoun requested a review from adalpari September 10, 2025 15:07
Copy link
Contributor

@adalpari adalpari left a comment

Choose a reason for hiding this comment

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

Nice code improvement. Thanks!
LGTM!

@dcalhoun dcalhoun merged commit c9919fc into trunk Sep 11, 2025
36 checks passed
@dcalhoun dcalhoun deleted the feat/improve-app-password-required-dialog branch September 11, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants