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-13886 show dialog when no logins were imported #4139

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

dseverns-livefront
Copy link
Collaborator

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-13886

📔 Objective

  • when the import logins flow attempts to sync, and it's successful but no items are returned we want to display this to the user in the form of the error dialog as if the sync failed. Allowing them to try again or exit.

📸 Screenshots

pm13886.mp4

⏰ 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 Oct 23, 2024

Logo
Checkmarx One – Scan Summary & Details880a9b09-dccb-4ba8-85b1-45cce1b7ff02

No New Or Fixed Issues Found

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.95%. Comparing base (1c10a94) to head (a61b5a1).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...arden/data/vault/repository/VaultRepositoryImpl.kt 62.50% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4139      +/-   ##
==========================================
- Coverage   88.95%   88.95%   -0.01%     
==========================================
  Files         439      439              
  Lines       38051    38064      +13     
  Branches     5333     5336       +3     
==========================================
+ Hits        33848    33858      +10     
- Misses       2345     2346       +1     
- Partials     1858     1860       +2     

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

val itemsAvailable = vaultDiskSource
.getCiphers(userId)
.firstOrNull()
?.isNotEmpty() ?: false
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 the ?: false down a line

@@ -1061,4 +1061,5 @@ Do you want to switch to this account?</string>
<string name="save_the_exported_file_highlight">Save the exported file</string>
<string name="this_is_not_a_recognized_bitwarden_server_you_may_need_to_check_with_your_provider_or_update_your_server">This is not a recognized Bitwarden server. You may need to check with your provider or update your server.</string>
<string name="syncing_logins_loading_message">Syncing logins...</string>
<string name="no_logins_were_imported">No logins were imported</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you make sure the indentation here matches.


@Suppress("MaxLineLength")
@Test
fun `syncForResult should return success result with itemsAvailable = false when sync succeeds and ciphers list is empty`() = runTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wanna run the formatter here, even with the suppression, runTest { should be on it's own line

@dseverns-livefront dseverns-livefront added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit b0885ff Oct 24, 2024
9 checks passed
@dseverns-livefront dseverns-livefront deleted the PM-13886-no-logins-imported branch October 24, 2024 17:33
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