8000 PM-12779: Add account security set up unlock method action card by matt-livefront · Pull Request #984 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PM-12779: Add account security set up unlock method action card #984

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

Merged

Conversation

matt-livefront
Copy link
Collaborator
@matt-livefront matt-livefront commented Sep 27, 2024

🎟️ Tracking

PM-12779

📔 Objective

Adds a new action card to the account security settings menu for setting up an unlock method.

📸 Screenshots

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-09-27.at.16.28.28.mp4

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) 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

Comment on lines +115 to +116
/// - includeLinePadding: A flag to indicate if the style should apply padding around the
/// view to account for the font's line height. Defaults to `true`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The style guide modifier adds extra padding to text to try and match the line height of the font in Figma. But this was causing some issues when trying to align the views at the top of the action card, where the text was too low compared to the badge and close button.

Simulator Screenshot - iPhone 15 Pro - 2024-09-27 at 16 47 00

Comment on lines +37 to +42
8000
// Add custom horizontal and vertical padding to ensure the frame of the badge is a
// square. When the view is clipped to a circle, this ensures the frame of the view
// matches the size of the circle. Otherwise, clipping can cause there to be extra
// space in the frame which can affect the layout when the badge is used.
.padding(.horizontal, (circleDiameter - textSize.width) / 2 + badgePadding)
.padding(.vertical, (circleDiameter - textSize.height) / 2 + badgePadding)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without these changes, the frame of the badge had extra vertical padding when displaying text that was taller than wider. This was also causing alignment issues at the top of action card.

Before After
Screenshot 2024-09-27 at 4 41 10 PM Screenshot 2024-09-27 at 4 43 19 PM

@matt-livefront matt-livefront marked this pull request as ready for review September 27, 2024 22:07
Copy link
codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 96.95122% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.83%. Comparing base (c20c8b3) to head (93e486e).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...rm/Application/Extensions/View+OnSizeChanged.swift 75.00% 3 Missing ⚠️
...red/UI/Platform/Settings/SettingsCoordinator.swift 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
+ Coverage   88.77%   88.83%   +0.05%     
==========================================
  Files         638      643       +5     
  Lines       40129    40366     +237     
==========================================
+ Hits        35625    35859     +234     
- Misses       4504     4507       +3     

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

Copy link
Contributor
github-actions bot commented Sep 27, 2024

Logo
Checkmarx One – Scan Summary & Detailsd345d705-7a33-41b8-96b6-057387bb9bff

No New Or Fixed Issues Found

fedemkr
fedemkr previously approved these changes Sep 30, 2024
Copy link
Member
@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

⛏️ There seem to be some Codecov tests missing, I'll defer to you as to whether include them or not given that some of them seem very trivial.

@matt-livefront
Copy link
Collaborator Author

⛏️ There seem to be some Codecov tests missing, I'll defer to you as to whether include them or not given that some of them seem very trivial.

Thanks, I added tests for the action card. The view extension would be hard to test.

@matt-livefront matt-livefront merged commit a5ead36 into main Oct 1, 2024
9 checks passed
@matt-livefront matt-livefront deleted the matt/PM-12779-account-security-unlock-action-card branch October 1, 2024 15:18
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.

2 participants
0