-
-
Notifications
You must be signed in to change notification settings - Fork 275
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(suite): add guide link to the destination tag #16847
Conversation
WalkthroughThe pull request introduces guide link functionality to two components: Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx (1)
24-24
: Consider extracting the guide path as a constant.The guide path is hardcoded in the handler. For better maintainability and reusability, consider extracting it to a constants file.
+const DESTINATION_TAG_GUIDE_PATH = '/3_send-and-receive/transactions-in-depth/destination-tags.md'; + const handleOpenGuide = (e: React.MouseEvent<HTMLButtonElement>) => { e.stopPropagation(); - openNodeById('/3_send-and-receive/transactions-in-depth/destination-tags.md'); + openNodeById(DESTINATION_TAG_GUIDE_PATH); };Also applies to: 55-58
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx
(5 hunks)packages/suite/src/support/messages.ts
(1 hunks)packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx
(3 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/suite/src/support/messages.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: run-desktop-tests (@group=wallet, trezor-user-env-unix bitcoin-regtest)
- GitHub Check: run-desktop-tests (@group=settings, trezor-user-env-unix bitcoin-regtest)
- GitHub Check: run-desktop-tests (@group=device-management, trezor-user-env-unix)
- GitHub Check: run-desktop-tests (@group=suite, trezor-user-env-unix)
- GitHub Check: build-web
- GitHub Check: Setup and Cache Dependencies
- GitHub Check: build-web
- GitHub Check: Analyze with CodeQL (javascript)
🔇 Additional comments (4)
packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx (2)
4-4
: LGTM!The import changes are minimal and correctly organized, adding only the necessary components and hooks for the new guide link functionality.
Also applies to: 9-9
62-71
: LGTM!The layout changes are well-structured:
- Row component provides proper spacing and alignment
- Button uses appropriate variant and size for consistency
- Translation ID is correctly used for internationalization
packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx (2)
10-10
: LGTM!The import changes are minimal and correctly organized, adding only the necessary components and hooks for the new guide link functionality.
Also applies to: 24-24
138-152
: LGTM!The layout changes are well-structured:
- Link component uses appropriate variant and typography style
- Translation component correctly uses values prop for dynamic content
- Event handler is properly bound
packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx
Show resolved
Hide resolved
a0c3511
to
89045f2
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx (1)
65-74
: Consider improving button accessibility.While the layout is well-structured, consider enhancing accessibility by:
- Adding an aria-label to the button for screen readers
- Evaluating if the "tiny" size provides sufficient touch target area
<Button variant="tertiary" type="button" size="tiny" + aria-label={translationString('DESTINATION_TAG_GUIDE_LINK')} onClick={handleOpenGuide} > <Translation id="DESTINATION_TAG_GUIDE_LINK" /> </Button>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx
(5 hunks)packages/suite/src/support/messages.ts
(1 hunks)packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx
- packages/suite/src/support/messages.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: run-desktop-tests (@group=wallet, trezor-user-env-unix bitcoin-regtest)
- GitHub Check: run-desktop-tests (@group=settings, trezor-user-env-unix bitcoin-regtest)
- GitHub Check: build-web
- GitHub Check: run-desktop-tests (@group=device-management, trezor-user-env-unix)
- GitHub Check: run-desktop-tests (@group=suite, trezor-user-env-unix)
- GitHub Check: Setup and Cache Dependencies
- GitHub Check: build-web
- GitHub Check: Analyze with CodeQL (javascript)
🔇 Additional comments (2)
packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx (2)
4-4
: LGTM! Clean imports and well-structured constant definition.The imports and constant definition are well-organized and follow the project's conventions.
Also applies to: 9-9, 13-14
27-27
: LGTM! Well-implemented event handler with proper typing.The guide opening functionality is well-implemented with proper event handling and type safety.
Also applies to: 58-61
Merge it 🙏 |
Description
Added a guide link to the destination tag input and to the receive modal info box.
Related Issue
Resolve #16842
Screenshots: