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-15067 - Design Audit - Prevent Account Lockout Screen #4361

Merged

Conversation

phil-livefront
Copy link
Collaborator

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

🎟️ Tracking

PM-15067

📔 Objective

  • Center align the title and subtitle text
  • Updated the PreventAccountLockoutScreen to use the BitwardenContentCard which matches the figma designs

📸 Screenshots

PreventAccountLockoutScreen

⏰ 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 21, 2024

Logo
Checkmarx One – Scan Summary & Details76d110f9-f001-4b6c-b305-436d25795b03

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

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 Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 251
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 240
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 262
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 26

@@ -75,102 +68,57 @@ fun PreventAccountLockoutScreen(
)
},
) {
Column(
NeverLoseAccessContent(
Copy link
Collaborator

@david-livefront david-livefront Nov 21, 2024

Choose a reason for hiding this comment

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

Can we call this PreventAccountLockoutContent to keep it consistent with the screen

.clip(RoundedCornerShape(size = 4.dp))
.background(BitwardenTheme.colorScheme.background.tertiary),
) {
private fun NeverLoseAccessContent(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.

The convention here is to provide a default Modifier as well

@@ -107,7 +108,7 @@ private fun BitwardenContentBlock(
?: Spacer(Modifier.width(16.dp))
}

Column {
Column(modifier = Modifier.padding(end = 16.dp)) {
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 leave this in the spacer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't get it to work as it was, it was still going to the very edge of the view. Any ideas why? On iOS we use spacers to space out views easily vs adding a spacer for padding reasons so I was pretty confused here haha.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Wanna give this a whirl:

        Column(modifier = Modifier.weight(weight = 1f, fill = false)) {
            Spacer(Modifier.height(12.dp))
            Text(
                text = headerText,
                style = headerTextStyle,
            )
            subtitleText?.let {
                Spacer(Modifier.height(4.dp))
                Text(
                    text = it,
                    style = subtitleTextStyle,
                    color = BitwardenTheme.colorScheme.text.secondary,
                )
            }
            Spacer(Modifier.height(12.dp))
        }
        Spacer(Modifier.width(16.dp))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

worked like a charm. thanks!

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.02%. Comparing base (1e223b1) to head (222cd79).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4361      +/-   ##
==========================================
- Coverage   89.02%   89.02%   -0.01%     
==========================================
  Files         451      451              
  Lines       39137    39106      -31     
  Branches     5524     5523       -1     
==========================================
- Hits        34843    34813      -30     
  Misses       2368     2368              
+ Partials     1926     1925       -1     

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


🚨 Try these New Features:

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 Nov 22, 2024
Merged via the queue into main with commit 050b3b3 Nov 22, 2024
9 checks passed
@phil-livefront phil-livefront deleted the phil/PM-15067-design-audit-prevent-account-lockout-screen branch November 22, 2024 17:39
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