8000 PM-17854: Add vault item type selection menu to FAB by matt-livefront · Pull Request #1351 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PM-17854: Add vault item type selection menu to FAB #1351

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
merged 8 commits into from
Feb 14, 2025

Conversation

matt-livefront
Copy link
Collaborator
@matt-livefront matt-livefront commented Feb 13, 2025

🎟️ Tracking

PM-17854

📔 Objective

This moves the vault item type selection menu from the vault add/edit screen and integrates it with the FAB in the vault list.

  • From the main vault list, the FAB will show a menu allowing adding a login, card, identity, secure note, or folder.
  • From a cipher type vault group (logins, cards, identities, or secure notes: the FAB will create a new vault item based on the vault group currently shown.
  • From a folder or collection vault group: the FAB will show options for creating a new login, card, identity, or secure note.

📸 Screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-13.at.13.47.27.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

Copy link
codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 98.05825% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.66%. Comparing base (b0c3263) to head (a016a58).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ore/Autofill/Utilities/ActionExtensionHelper.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1351      +/-   ##
==========================================
+ Coverage   89.64%   89.66%   +0.02%     
==========================================
  Files         754      755       +1     
  Lines       47459    47519      +60     
==========================================
+ Hits        42544    42608      +64     
+ Misses       4915     4911       -4     

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

Copy link
Contributor
github-actions bot commented Feb 13, 2025

Logo
Checkmarx One – Scan Summary & Details20bb0cf3-f7ed-4dd6-bbd0-49db78564b4d

Great job, no security vulnerabilities found in this Pull Request

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.

Looks good, just one small ⛏️

Comment on lines 135 to 144
/// - Parameters:
/// - addItem: The action to perform when a new cipher item type is tapped in the menu.
/// - addFolder: The action to perform when the new folder button is tapped in the menu.
/// - Returns: A `FloatingActionMenu` configured for adding a vault item for folder.
///
func addVaultItemFloatingActionMenu(
hidden: Bool = false,
addItem: @escaping (CipherType) -> Void,
addFolder: (() -> Void)? = nil
) -> some View {
Copy link
Member

Choose a reason for hiding this comment

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

⛏️ Missing hidden parameter docs.

Comment on lines +30 to +39
var floatingActionButtonType: FloatingActionButtonType? {
switch group {
case .card, .identity, .login, .secureNote:
return .button
case .collection, .folder, .noFolder:
return .menu
case .sshKey, .totp, .trash:
return nil
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎨 Could we add a unit test for floatingActionButtonType

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, added.

@matt-livefront matt-livefront merged commit 550191a into main Feb 14, 2025
9 checks passed
@matt-livefront matt-livefront deleted the matt/PM-17854-vault-item-type branch February 14, 2025 16:05
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
0