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
Feature/top bar navigation #1560
base: develop
Are you sure you want to change the base?
Conversation
5253289
to
4d32d99
Compare
4d32d99
to
7d9549b
Compare
7d9549b
to
5986fd7
Compare
96bb38b
to
b0bcb95
Compare
b0bcb95
to
f9bf2d8
Compare
@@ -65,6 +59,20 @@ internal class CardComponentDialogFragment : BaseComponentDialogFragment(), Addr | |||
.launchIn(viewLifecycleOwner.lifecycleScope) | |||
} | |||
|
|||
private fun initToolbar() = with(binding.bottomSheetToolbar) { |
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 found an edge case scenario that displays the wrong icon:
- Load drop-in with only one payment method that can display multiple screens (card + address lookup or BACS)
- Configure drop-in with
setSkipListWhenSinglePaymentMethod(true)
- Open drop-in and open the second screen
- A back icon is expected to show but a close icon is actually shown
- Tapping the icon does go back to the first screen so the tap action works correctly
I don't think we can do this now without adding extra functionality, let's discuss whether it's worth it to handle 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.
Good point. I did not like leaving it like that, so I fixed it. Could you please test it again?
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.
Great effort with this! I like the general idea but my main issue with the implementation is that it only works for us internally (drop-in). Merchants using standalone components won't be able to benefit from it (as we're observing component.viewFlow
which is internal). It would be great if this became part of some public functionality.
Personally I wouldn't mind if we keep this part out of the scope of this PR as it's getting quite big and all of the solutions are going to be complicated enough to deserve their own PR.
cd11e33
to
8439e6a
Compare
override fun handleBackPress(): Boolean { | ||
val isConfirmationMode = _componentStateFlow.value.mode == BacsDirectDebitMode.CONFIRMATION | ||
return if (isConfirmationMode) { | ||
return if (isModeConfirmation()) { |
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.
a small one: i think we should call canHandleBackPress()
here to check instead of isModeConfirmation()
directly then we know we will handle back press if we can, then if we want to know how we decide that we can always go see the canHandleBackPress()
details.
override fun handleBackPress(): Boolean { | ||
return if (_viewFlow.value == CardComponentViewType.AddressLookup) { | ||
return if (isViewTypeAddressLookup()) { |
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'd use the same approach here as well
8439e6a
to
56f5e89
Compare
…r navigation button COAND-868
COAND-868
COAND-868
…roll in nested scrollview COAND-868
56f5e89
to
0316dc4
Compare
Quality Gate failedFailed conditions |
Description
This PR includes the following changes:
Checklist
COAND-868