-
Notifications
You must be signed in to change notification settings - Fork 986
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
fix: ensure the key pair action button opens bottom-sheet inside key pairs and accounts #20611
Conversation
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.
Self-review comments 📖
:on-press #(when (= action :selector) (on-press)) | ||
:pointer-events :box-only} |
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.
Here I'm removing this :pointer-events
prop because when it's set to box-only
it will not allow the pointer events to hit reach the "..." menu button inside the key-pair component.
Perhaps we need to pass a configuration prop for this if we need to ensure it's box-only
sometimes, thoughts?
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 sure why we need it at all 🤔
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'm not sure why it's needed in the first place 🤔 .
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 added the box-only
because when we use it for keypair selection, other non important areas are pressable and make hard to select the proper keypair.
@seanstrom Probably we should handle the :box-only
according to the variant displayed
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.
@ulisesmac Oh I see, so this is meant to make it simpler to press the key-pair, in that case I'll try using (when (= action :selector) :box-only)
for that prop. Thank you for clarifying 🙏
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.
@ulisesmac - I suppose the on-press
should be handled by the selector (it receives the on-change
prop), not the parent. WDYT? This would help us prevent these pointer event tricks.
status-mobile/src/quo/components/wallet/keypair/view.cljs
Lines 52 to 56 in 8aa1cad
:selector [selectors/view | |
{:type :radio | |
:checked? selected? | |
:blur? blur? | |
:customization-color customization-color}] |
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.
@smohamedjavid I'm not sure, but I think the intent is to make the key-pair component easier to select during the key-pair selection step. If we put the on-press
handler on the selector, that would make the target smaller for selecting a key-pair when ideally it would be the entire key-pair UI.
Jenkins BuildsClick to see older builds (8)
|
:on-press #(when (= action :selector) (on-press)) | ||
:pointer-events :box-only} |
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'm not sure why it's needed in the first place 🤔 .
7b37094
to
a7cb467
Compare
49% of end-end tests have passed
Failed tests (24)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestWalletMultipleDevice:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestDeepLinksOneDevice:
Expected to fail tests (2)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestWalletOneDevice:
Passed tests (25)Click to expandClass TestCommunityOneDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestWalletOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
Hey @seanstrom ! Your fix looks good on both platforms. |
a7cb467
to
c4bddf5
Compare
…#20611) This change attempts to only to override the default `pointer-events` behaviour for the `quo/keypair` component when the component uses the `selector` action. Now when the `quo/keypair` component is rendered with a selector, only the top-level view of the component will be pressable. And when the `quo/keypair` component is rendered without a selector it will allow for the children of the component to be pressable too.
fixes #20609
Summary
Platforms
Areas that maybe impacted
Functional
Steps to test
Screen capture after changes
Screen.Recording.2024-07-04.at.11.51.45.mov
status: ready