-
Notifications
You must be signed in to change notification settings - Fork 15
feat: new feedback components for transaction workflows #188
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
base: main
Are you sure you want to change the base?
Conversation
…e-txn-status step-flow-status
…or, txn-progress-steps, txn-retry-button
|
thanks @vvm1004 , will check & feedback ASAP |
|
hey @vvm1004 ! really appreciate the effort and the contribution here – clearly a lot of work went into this 🙌 that said, I’d like to give a few pieces of feedback to help align better with how we’re maintaining the codebase and reviewing contributions: 1. structure & tooling
2. component design & previews
3. priorities & scope
4. review strategy
thanks again for taking the time to build all of this! excited to iterate and land these components — just want to make sure it happens in a way that scales with the rest of the codebase |
|
Oke @0xLou1s, i will split each component into PR and send back to you, hope you will review |
|
Hey @0xLou1s , here are some of my thoughts after doing and thinking back. As for the preview component, there are some components that I have to write the preview component file outside of MDX; otherwise, it cannot be displayed or used properly because these are all reused components. For example, clicking on something is necessary to display both SuccessDialog and TxErrorFallback; however, the useState() hook required to open these components cannot be used in an MDX file. As for deep integration with SDK and onchain workflows, I feel that my components can meet the requirements. For example, with Jupiter Recurring DCA’s Recurring Setup Form, when successful, you can use SuccessDialog or TxFeedbackToast; similarly, if it fails, you can use TxnErrorFallback, TxFeedbackToast, or integrate Step Flow Dialog into Swap Token Form. However, I feel that I cannot write all my component code inside existing components because there are some things that I cannot test: Murphy configured them on Mainnet, I did not fully understand the business logic, or I simply did not feel confident editing existing code—although I have successfully integrated Step Flow Dialog into Swap Token Form. Therefore, I think I will use simple examples or describe how to use the components in the preview file and then use them in the MDX file. If I reuse old components and integrate a new one into the new MDX file, it feels repetitive, and I think users can also use the new component as they want. And finally, these are just UI/UX components and don’t have much logic. If possible, I hope to contribute to more logic-oriented components in the following issues. What do you think about this? Does it make sense to you? |
|
hey @vvm1004 , your reasoning makes sense 👍 thanks for clarifying. I'll go through your new PRs ASAP and leave feedback there. appreciate the contributions |
This pull request introduces a comprehensive set of reusable UI components to support transaction workflows in Murphy SDK. These components enhance the developer and end-user experience by providing consistent feedback mechanisms across multi-step dApp interactions such as minting, staking, and token transfers.
Below are the key additions grouped by functionality:
🔄 Step Flow and Dialog Components
TxnProgressSteps— A visual step tracker (horizontal or vertical) to guide users through multi-step transaction flows (e.g., Connect → Submit → Confirm).File:
components/ui/murphy/Txn-Feedback/txn-progress-steps.tsxStepFlowDialog— A modal wrapper for composing multi-step workflows, useful for guided flows like NFT minting or fusion.File:
components/ui/murphy/Txn-Feedback/step-flow-dialog.tsxSuccessDialog— A confirmation modal shown after successful transactions, with optional explorer links and action buttons.File:
components/ui/murphy/Txn-Feedback/success-dialog.tsx⚠ Error Handling and Retry Logic
TxErrorFallback— A fallback UI shown when a transaction fails, including retry capability and optional log display.File:
components/ui/murphy/Txn-Feedback/txn-error-fallback.tsxTxRetryButton— A button component that wraps any action with built-in retry handling and transaction state awareness.File:
components/ui/murphy/Txn-Feedback/txn-retry-button.tsx📣 Feedback and Transaction Status
TxFeedbackToast— Toast notifications that display transaction status updates such as preparing, confirming, success, and error.File:
components/ui/murphy/Txn-Feedback/txn-feedback-toast.tsxTxnPendingIndicator— A global UI element that indicates when one or more transactions are still confirming, with optional positioning.File:
components/ui/murphy/Txn-Feedback/txn-pending-indicator.tsxInlineTxStatus— Inline chips/icons to represent the state of individual transactions (pending, success, failure) in compact views.File:
components/ui/murphy/Txn-Feedback/inline-txn-status.tsx🔗 Blockchain Explorer Integration
TxnExplorerLink— Renders a Solana Explorer link based on transaction signature and cluster, with support for various sizes and styles.File:
components/ui/murphy/Txn-Feedback/txn-explorer-link.tsxAll components are:
useWalletanduseTransactionQueueshadcn/uito ensure visual consistencyThese additions significantly reduce boilerplate, prevent duplicated UI logic, and improve the clarity and trust of Solana transaction experiences in Murphy-powered applications.