Repository navigation
[PM-43011] feat: Land on newly created vault item after save - #7417
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the save-flow change that lands the user on a newly created vault item: Code Review DetailsNo findings met the confidence threshold for posting. Candidates considered and dismissed during validation:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7417 +/- ##
==========================================
- Coverage 86.10% 84.39% -1.72%
==========================================
Files 947 949 +2
Lines 67238 67370 +132
Branches 9335 9346 +11
==========================================
- Hits 57894 56854 -1040
- Misses 5857 7054 +1197
+ Partials 3487 3462 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| */ | ||
| data object Success : CreateCipherResult() | ||
| data class Success( | ||
| val cipherId: String, |
| ) | ||
| sendEvent(event = VaultAddEditEvent.NavigateBack) | ||
| } else { | ||
| sendEvent( |
There was a problem hiding this comment.
Should we still show the sanckbar?
There was a problem hiding this comment.
I saw that we show the snackbar based on a nav-arg. I assume that is because the screen does not yet exist and the sanckbar will be consumed elsewhere?
I think that all seems fine but can we drop a comment here indicating that the sanckbar is handled elsewhere.
There was a problem hiding this comment.
Exactly, we do not have the screen yet so I am passing an argument to the screen to display the snackbar.
Will add a comment stating it.
| ) | ||
| if (savedStateHandle.toVaultItemArgs().showCreatedSnackbar && !hasShownCreatedSnackbar) { | ||
| hasShownCreatedSnackbar = true | ||
| sendEvent(VaultItemEvent.ShowSnackbar(message = state.cipherType.savedSnackbarMessage)) |
There was a problem hiding this comment.
Ahhh, so this is how you are displaying the snackbar
There was a problem hiding this comment.
Will definitely add a comment 😄
| /** | ||
| * Navigate to the newly created vault item's detail screen. | ||
| */ | ||
| data class NavigateToVaultItem( |
There was a problem hiding this comment.
Can we name this to be more specific?
Like CloseAndNavigateToVaultItem,
| onNavigateToAttachments: (cipherId: String) -> Unit, | ||
| onNavigateToMoveToOrganization: (cipherId: String, showOnlyCollections: Boolean) -> Unit, | ||
| onNavigateToPlan: () -> Unit, | ||
| onNavigateToVaultItem: (cipherId: String, cipherType: VaultItemCipherType) -> Unit, |
There was a problem hiding this comment.
Same thing, can we updates the callbacks all the way up to indicate that this closes the screen and navigates to the vault item.
| class VaultItemCipherTypeExtensionsTest { | ||
|
|
||
| @Test | ||
| fun `savedSnackbarMessage should return the correct value for each VaultItemCipherType`() { |
|
thanks @david-livefront |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-43011
📔 Objective
When a user creates a new vault item, navigate directly to the newly created item's view screen and show a "saved" snackbar there, instead of navigating back to the previous screen. The autofill-selection save flow is unchanged.
📸 Screenshots
N/A — navigation/snackbar timing change only, no new UI.