[WEB-2145] chore: added copy button for intake issues#5455
[WEB-2145] chore: added copy button for intake issues#5455SatishGandham merged 3 commits intopreviewfrom
Conversation
WalkthroughThe changes enhance the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/inbox/content/inbox-issue-header.tsx (4 hunks)
Additional comments not posted (4)
web/core/components/inbox/content/inbox-issue-header.tsx (4)
16-16: New import added forCopyicon.The
Copyicon fromlucide-reactlibrary is imported correctly.The code changes are approved.
97-97: New variableintakeIssueLinkcreated.The variable
intakeIssueLinkis correctly constructed to store the path to the intake issue.The code changes are approved.
171-178: New functionhandleCopyIntakeIssueLinkadded.The function
handleCopyIntakeIssueLinkis correctly implemented to handle the copy-to-clipboard action and display a success toast notification.The code changes are approved.
376-381: New menu item added toCustomMenu.The new menu item is correctly added to trigger the
handleCopyIntakeIssueLinkfunction.The code changes are approved.
| }) | ||
| ); | ||
|
|
||
| const handleCopyIntakeIssueLink = () => |
There was a problem hiding this comment.
Can we reuse the handleCopyIssueLink function here by passing an argument to specify whether to copy the intake path or the issue path?
| </div> | ||
| </CustomMenu.MenuItem> | ||
| )} | ||
| <CustomMenu.MenuItem onClick={handleCopyIntakeIssueLink}> |
There was a problem hiding this comment.
Update the UX to 'Copy issue link' and position it above the 'Delete' option.
Updated button UX and handleCopyIssue function
There was a problem hiding this comment.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/inbox/content/inbox-issue-header.tsx (7 hunks)
Additional comments not posted (4)
web/core/components/inbox/content/inbox-issue-header.tsx (4)
16-16: LGTM!The import statement for the
Copyicon is correct and necessary for the new functionality.
97-97: LGTM!The
intakeIssueLinkvariable is correctly constructed using the provided parameters.
162-163: LGTM!The
handleCopyIssueLinkfunction is correctly implemented and enhances the functionality by making it reusable for different paths.
368-373: LGTM!The new menu item for copying the
intakeIssueLinkis correctly implemented and enhances the user interface by providing an additional option to copy the intake issue link.
| // const handleCopyIntakeIssueLink = () => | ||
| // copyUrlToClipboard(intakeIssueLink).then(() => | ||
| // setToast({ | ||
| // type: TOAST_TYPE.SUCCESS, | ||
| // title: "Link copied", | ||
| // message: "Issue link copied to clipboard", | ||
| // }) | ||
| // ); | ||
|
|
There was a problem hiding this comment.
Remove commented-out code.
The handleCopyIntakeIssueLink function is commented out and should be removed to maintain code cleanliness.
Apply this diff to remove the commented-out code:
- // const handleCopyIntakeIssueLink = () =>
- // copyUrlToClipboard(intakeIssueLink).then(() =>
- // setToast({
- // type: TOAST_TYPE.SUCCESS,
- // title: "Link copied",
- // message: "Issue link copied to clipboard",
- // })
- // );Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // const handleCopyIntakeIssueLink = () => | |
| // copyUrlToClipboard(intakeIssueLink).then(() => | |
| // setToast({ | |
| // type: TOAST_TYPE.SUCCESS, | |
| // title: "Link copied", | |
| // message: "Issue link copied to clipboard", | |
| // }) | |
| // ); |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/inbox/content/inbox-issue-header.tsx (7 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/core/components/inbox/content/inbox-issue-header.tsx
Changes
No 'copy link' option was available for issues in intake like in other features.
Implementation
References
[WEB-2145]
Summary by CodeRabbit
These enhancements improve user interaction and streamline workflows related to inbox issues.