-
Notifications
You must be signed in to change notification settings - Fork 818
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-11304] Ownership Not Defaulting To Org and Collection #4254
Conversation
No New Or Fixed Issues Found |
…ection # Conflicts: # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingNavigation.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultGraphNavigation.kt
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4254 +/- ##
==========================================
- Coverage 89.01% 89.00% -0.02%
==========================================
Files 453 453
Lines 39049 39067 +18
Branches 5480 5485 +5
==========================================
+ Hits 34758 34770 +12
- Misses 2369 2374 +5
- Partials 1922 1923 +1 ☔ View full report in Codecov by Sentry. |
@@ -134,11 +134,16 @@ fun VaultAddEditState.ViewState.appendFolderAndOwnerData( | |||
), | |||
selectedOwnerId = activeAccount.toSelectedOwnerId( | |||
cipherView = currentContentState.common.originalCipher, | |||
), | |||
) | |||
?: collectionViewList.firstOrNull { |
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.
Since this is now chaining, can we clean up the formatting here:
selectedOwnerId = activeAccount
.toSelectedOwnerId(cipherView = currentContentState.common.originalCipher)
?: collectionViewList
.firstOrNull { it.id == currentContentState.common.selectedCollectionId }
?.organizationId,
@@ -93,7 +94,8 @@ fun NavGraphBuilder.vaultItemListingDestinationAsRoot( | |||
onNavigateToVaultAddItemScreen: ( | |||
cipherType: VaultItemCipherType, | |||
selectedFolderId: String?, | |||
) -> Unit, | |||
selectedCollectionId: String?, | |||
) -> Unit, |
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.
This should not have the extra indentation.
@@ -23,7 +23,8 @@ fun NavGraphBuilder.vaultGraph( | |||
onNavigateToVaultAddItemScreen: ( | |||
vaultItemCipherType: VaultItemCipherType, | |||
selectedFolderId: String?, | |||
) -> Unit, | |||
selectedCollectionId: String?, | |||
) -> Unit, |
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.
Same here
Code looks swell, just the minor formatting stuff |
id = UUID.randomUUID().toString(), | ||
id = UUID | ||
.randomUUID() | ||
.toString(), |
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.
Any reason to make this change?
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.
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.
Hmm, that should not happen as part of the formatter. To be clear, there is nothing wrong with this change but the regular auto-formatter does not normally do this. 🤔
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.
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've updated to match yours, thanks
# Conflicts: # app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlocked/VaultUnlockedNavigation.kt # app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarNavigation.kt # app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditNavigation.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensions.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingNavigation.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreen.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultGraphNavigation.kt # app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreenTest.kt # app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreenTest.kt
# Conflicts: # app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt
private fun handleSshKeyCipherItemsFeatureFlagReceive( | ||
action: VaultAddEditAction.Internal.SshKeyCipherItemsFeatureFlagReceive, | ||
) { | ||
mutableStateFlow.update { |
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.
Can we add a test for this action
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.
That was actually a merge mistake, I've already reverted it. Thanks for catching that!
@david-livefront Cleaned everything up it should be good now, thanks for the heads up! 👍 |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-11304
📔 Objective
Fix bug where the ownership and collection is not defaulting to the screen where it is being created at.
Also fixed the add item float button that wasn't showing for collection.
📸 Screenshots
Screen.Recording.2024-11-08.at.09.01.42.mov
⏰ 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 confirmedissue 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