-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
feat: Control return to confirm action #10306
Conversation
✅ Deploy Preview for koda-canary ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
bug or a feature :)
probably we should only allow that shortcut if the transaction has not started
CleanShot.2024-05-16.at.17.18.47.mp4
can useMagicKeys combinations give you a cleaner solution?
thank you very much for checking it @hassnian |
Thank you! I have updated it. |
What should be the correct behavior? working only for confirmation buttons on modals or also for trying again when a transaction is cancelled/fails? Transfer: doesn't work on confirmation button prob because it uses a different modal |
I prefer it only works for confirmation buttons on modal.
Yup, it's a separate modal. However, I have also made the transfer confirm modal work with the shortcut. Now it should work as the others.
Only applying to the confirm button should be enough. |
modal animation is gone this pr CleanShot.2024-05-20.at.17.03.43.mp4canary CleanShot.2024-05-20.at.17.04.16.mp4 |
@@ -1,5 +1,5 @@ | |||
<template> | |||
<teleport to="body" :disabled="!appendToBody"> | |||
<teleport v-if="isModalActive" to="body" :disabled="!appendToBody"> |
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 do a local solution for each modal
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.
Why apply it for each modal? It's kind of a bug from OModal
that the DOM of modal will not be removed after closing the modal.
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.
useKeyboardKeys({ | ||
onPressControlEnter: handleSubmit, | ||
}) |
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.
enabled
if action button is visible
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.
It's not needed, because the keyboard event would be listened to only when the action button component is mounted.
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.
Got it. The trickier thing is that the action button is always visible and not be unmounted, due to the memory leak of the modal.... #10306 (comment)
@@ -0,0 +1,11 @@ | |||
import { useMagicKeys } from '@vueuse/core' | |||
|
|||
export function useKeyboardKeys({ onPressControlEnter }) { |
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.
export function useKeyboardKeys({ onPressControlEnter }) { | |
export function useKeyboardKeys({ onPressControlEnter , enabled }) { |
useKeyboardKeys({ | ||
onPressControlEnter: confirmTransfer, | ||
}) |
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.
enabled
if isModalActive
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.
the same reason as the above comment
Code Climate has analyzed commit 806c624 and detected 0 issues on this pull request. View more on Code Climate. |
Quality Gate passedIssues Measures |
rechecking PR: on transfer, modal is being shown behind the other modal: modal.being.shown.behind.webm
buy now and listing are good |
Thank you for your contribution to the Koda - Generative Art Marketplace.
👇 __ Let's make a quick check before the contribution.
PR Type
Needs Design check
Needs QA check
Context
Did your issue had any of the "$" label on it?
Screenshot 📸