-
Notifications
You must be signed in to change notification settings - Fork 28
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
BWA-124 - 'Copy' Option Missing from Long-Press Menu #300
BWA-124 - 'Copy' Option Missing from Long-Press Menu #300
Conversation
No New Or Fixed Issues Found |
...lin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModel.kt
Outdated
Show resolved
Hide resolved
...lin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModel.kt
Outdated
Show resolved
Hide resolved
...va/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreenTest.kt
Outdated
Show resolved
Hide resolved
...com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModelTest.kt
Outdated
Show resolved
Hide resolved
...com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModelTest.kt
Outdated
Show resolved
Hide resolved
|
||
is ItemListingAction.EditItemClick -> { | ||
handleEditItemClick(action) | ||
handleItemClick(action.authCode) |
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.
Not a blocker for me, but more a discussion. @david-livefront on the password manager I know we have been avoiding unwrapping actions at this level and always passing the full action into the handle*()
function. I am seeing there are somethings in the when
that already kind of break away from some of those conventions like sending events, but curious if we want to keep that pattern up in Auth too.
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 is a good point, it is a little odd here that these are not actions though. I wonder if the handle
moniker is the problem 🤔
) | ||
|
||
viewModel.trySendAction( | ||
ItemListingAction.DropdownMenuClick(VaultDropdownMenuAction.DELETE, LOCAL_CODE), |
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.
⛏️ named args
|
||
viewModel.eventFlow.test { | ||
viewModel.trySendAction( | ||
ItemListingAction.DropdownMenuClick(VaultDropdownMenuAction.COPY, LOCAL_CODE), |
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.
⛏️ named args here too :)
.first { it.data != null } | ||
|
||
val didLaunchAddTotpFlow = authenticatorBridgeManager.startAddTotpLoginItemFlow( | ||
totpUri = item.data!!.toOtpAuthUriString(), | ||
totpUri = item.data?.toOtpAuthUriString() ?: "", |
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.
we can replace the ?: ""
with .orEmpty()
message = R.string.value_has_been_copied.asText(action.authCode), | ||
), | ||
) | ||
private fun handleItemClick(authCode: String) { |
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 copy
to this function name
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.
yeah good call
*/ | ||
data class MoveToBitwardenClick(val entityId: String) : ItemListingAction() | ||
data class DropdownMenuClick( |
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. |
🎟️ Tracking
BWA-124
📔 Objective
📸 Screenshots
Screen_recording_20241211_001056.mp4
⏰ 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