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

PM-15147 - Design Audit - Master Password Guidance Screen #4383

Conversation

phil-livefront
Copy link
Collaborator

@phil-livefront phil-livefront commented Nov 25, 2024

🎟️ Tracking

PM-15147

📔 Objective

  • Align Text: Center-align the title and subtitle text across relevant components.
  • Design Updates: Update the content block styling to match the Figma designs for V3.
  • Background Changes: Remove the blue background from the "What makes a password strong?" block.
  • Registration Screen Adjustments: Remove the blue content background from the CompleteRegistrationScreen where the MasterPasswordGuidanceScreen is launched. This follows iOS design changes. Retain the border color to minimize deviations.
  • Action Card Enhancement: Modify BitwardenActionCard to include an optional dismiss action, supporting scenarios like the MasterPasswordGuidanceScreen where no dismiss action is required.

📸 Screenshots

CompleteRegistration
MasterPasswordGuidanceScreen

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Nov 25, 2024

Logo
Checkmarx One – Scan Summary & Detailsb5865413-87af-47fc-a148-2af268d79ec7

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt: 875 Attack Vector
LOW Unpinned Actions Full Length Commit SHA /crowdin-push.yml: 26 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 341
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 341
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 26

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 98.63014% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.01%. Comparing base (bca9f5e) to head (c628d2f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...erpasswordguidance/MasterPasswordGuidanceScreen.kt 98.57% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4383      +/-   ##
==========================================
- Coverage   89.01%   89.01%   -0.01%     
==========================================
  Files         451      451              
  Lines       39123    39129       +6     
  Branches     5532     5533       +1     
==========================================
+ Hits        34827    34832       +5     
  Misses       2368     2368              
- Partials     1928     1929       +1     

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

contentDescription = stringResource(id = R.string.close),
onClick = onDismissClick,
)
onDismissClick?.let {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@Preview
@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
private fun BitwardenActionCardWithSubtitleNoDismiss_preview() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 👍

.fillMaxWidth()
.padding(horizontal = 16.dp),
)
Spacer(modifier = Modifier.height(24.dp))
Copy link
Collaborator

Choose a reason for hiding this comment

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

⛏️ maybe minor thing, curious what others thoughts are with this, maybe we can just remove the wrapping Columns and have it so at the call site its like

Column {
  ContentItem1()
  Spacer()
  ContentItem2() 
  etc.
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah i like this idea better, ill make the change!

cardTitle = stringResource(R.string.need_some_inspiration),
actionText = stringResource(R.string.check_out_the_passphrase_generator),
onActionClick = onActionClicked,
modifier = modifier
Copy link
Collaborator

Choose a reason for hiding this comment

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

⛏️ this is Okay as is, but could also just be same line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah okay, yeah one liner looks more "in-line" zing

Copy link
Collaborator

@dseverns-livefront dseverns-livefront left a comment

Choose a reason for hiding this comment

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

Just some style nits, but otherwise looks GR8

@@ -81,126 +78,134 @@ fun MasterPasswordGuidanceScreen(
)
},
) {
Column(
MasterPasswordGuidanceContent(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the LongMethod suppression above still needed?

)
Spacer(modifier = Modifier.navigationBarsPadding())
}
viewModel = viewModel,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't pass the whole VM into the content, just pass in the state and any lambdas needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay sounds good! Just curious, is there a downside to passing in the viewModel or just a style thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually after implementing the change it became much clearer to me why this is a better approach. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

It can also help with previews and individual composable tests (even if we rarely do those)

@@ -44,7 +44,7 @@ fun BitwardenActionCard(
cardTitle: String,
actionText: String,
onActionClick: () -> Unit,
onDismissClick: () -> Unit,
onDismissClick: (() -> Unit)? = null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this below the modifier, the pattern is that the modifier is always the first param with a default value

Copy link
Collaborator

@dseverns-livefront dseverns-livefront left a comment

Choose a reason for hiding this comment

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

@phil-livefront phil-livefront added this pull request to the merge queue Dec 2, 2024
)
Spacer(modifier = Modifier.navigationBarsPadding())
}
onTryPasswordGeneratorAction = {
Copy link
Collaborator

@david-livefront david-livefront Dec 2, 2024

Choose a reason for hiding this comment

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

Be sure to remeber the viewModel

modifier: Modifier = Modifier,
onTryPasswordGeneratorAction: () -> Unit,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be before the modifier.

Merged via the queue into main with commit b2391dd Dec 2, 2024
9 checks passed
@phil-livefront phil-livefront deleted the phil/PM-15147-design-audit-master-password-guidance-screen branch December 2, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants