-
Notifications
You must be signed in to change notification settings - Fork 53
BIT-424: Alert to export unencrypted vault #234
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
BIT-424: Alert to export unencrypted vault #234
Conversation
No New Or Fixed Issues Found |
Bitwarden code coverageTotal coverage:
|
File | Coverage |
---|---|
BitwardenShared/UI/Platform/Settings/Extensions/Alert+Settings.swift | 100.00% |
BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultProcessor.swift | 86.21% |
BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultView.swift | 100.00% |
Powered by Slather
Generated by 🚫 Danger
/// Show an alert to confirm exporting the vault. | ||
private func confirmExportVault() async { | ||
let encrypted = (state.fileFormat == .jsonEncrypted) | ||
|
||
// She the alert to confirm exporting the vault. | ||
coordinator.showAlert(.confirmExportVault(encrypted: encrypted) { | ||
// TODO: BIT-429 | ||
// TODO: BIT-447 | ||
// TODO: BIT-449 | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Does this method need to be async
? I'm pretty sure that all of the asynchronous code will be run within the Alert
's action, once the "Export vault" button is tapped, so I'm not sure if this method will be doing anything asynchronously itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was the pattern in the app for alerts whose action button triggers an async function? The code that will be run after the user selects the alert's confirm action will go on line 65 and will either have to start a Task
or be called with await
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case, the logic that goes in the alert's action will end up being async, but showing the alert isn't async (i.e. there's no await
in the confirmExportVault()
method), so the method doesn't need to be async. We currently don't support awaiting on showing the alert, so the alert will be shown and this will return, and a separate task will be kicked off for the alert's action.
8fd8308
to
266c2d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
🎟️ Tracking
BIT-424
🚧 Type of change
📔 Objective
Adds alerts for confirming the user wants to export the vault (both encrypted and unencrypted formats, as in the production app).
📋 Code changes
📸 Screenshots
⏰ Reminders before review
🦮 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