Feature #34703

"Copy link" feature for issue and issue journal

Added by Mizuki ISHIKAWA 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Mizuki ISHIKAWA% Done:

0%

Category:UI
Target version:4.2.0
Resolution:Fixed

Description

When you are looking at a issue with Redmine and want to share the URL, if you copy the URL with a browser, it will be a long URL with many unnecessary parameters such as issue_count and prev_issue_id.

I think it would be convenient to be able to copy a simple URL from the view.

  • URL of the issue to be copied: https://<your redmine>/issues/1
  • URL of the issue journal to be copied: http://<your redmine>/issues/1#note-1

feature-34703-1.patch Magnifier (7.1 KB) Mizuki ISHIKAWA, 2021-02-10 09:03

screenshot_2021-02-10_16.15.22.png (69.9 KB) Mizuki ISHIKAWA, 2021-02-10 09:03

screenshot_2021-02-10_16.14.35.png (112 KB) Mizuki ISHIKAWA, 2021-02-10 09:04

diff-rejected.patch Magnifier (6.7 KB) Mizuki ISHIKAWA, 2021-02-10 09:18

0001-Add-link-to-copy-object-s-url-to-the-clipboard.patch Magnifier (10.6 KB) Mizuki ISHIKAWA, 2021-03-09 03:17

0001-Add-link-to-copy-object-s-url-to-the-clipboard.patch Magnifier (10.6 KB) Mizuki ISHIKAWA, 2021-03-16 03:16

screenshot-2021-03-16-11.20.14.png (46.6 KB) Mizuki ISHIKAWA, 2021-03-16 03:20

0001-Add-link-to-copy-object-s-url-to-the-clipboard.patch Magnifier (12.4 KB) Mizuki ISHIKAWA, 2021-03-16 03:34

0002-Fix-to-change-the-shortcut-key-according-to-the-OS.patch Magnifier (1.44 KB) Mizuki ISHIKAWA, 2021-03-18 01:49


Related issues

Related to Redmine - Feature #34714: Move delete button for issues and journals to the dropdow... Closed
Related to Redmine - Feature #34932: "Copy link" feature for issues list Closed

Associated revisions

Revision 20816
Added by Go MAEDA about 1 month ago

"Copy link" feature for issue and issue journal (#34703).

Patch by Mizuki ISHIKAWA.

Revision 20817
Added by Go MAEDA about 1 month ago

Update locales (#34703).

History

#1 Updated by Mizuki ISHIKAWA 2 months ago

When I added the "Copy link" icon, it was crowded with many icons displayed on the view.
So this patch hides infrequently used action links in actions-dropdown, just like wiki pages.


If it is better to separate the patch that adds the function to copy the URL and the patch that combines the Action icons, it will be supported.
This patch contains an icon image, so apply it with the git apply command.

#2 Updated by Mizuki ISHIKAWA 2 months ago

For your reference, I've attached a patch with a pattern that doesn't combine the "Copy link" icon into actions-dropdown. (I don't like this UI very much)

#3 Updated by Marius BALTEANU 2 months ago

I really like the ideea of moving the Delete icons under the actions dropdown, I think we should extract it from your patch and added a separat tichet. From my point of view, this solution is a good fix for #31278.

Also, having the copy link it's a nice and useful feature.

#4 Updated by Bernhard Rohloff 2 months ago

Marius BALTEANU wrote:

I really like the ideea of moving the Delete icons under the actions dropdown, I think we should extract it from your patch and added a separat tichet. From my point of view, this solution is a good fix for #31278.

Good point there.

Also, having the copy link it's a nice and useful feature.

I like the feature, too. Sharing a link in a chat is a bit tedious at the moment.

I've tried your patch and it worked quite well. The only thing I've missed was some kind of feedback after copying the URL to the clipboard. On all web applications which allowed me to copy stuff to the clipboard I got a toast or little message, that the job has finished. So I felt a bit awkward after clicking the copy link without anything happening.

#5 Updated by Mizuki ISHIKAWA 2 months ago

Thank you for your feedback.

Marius BALTEANU wrote:

I really like the ideea of moving the Delete icons under the actions dropdown, I think we should extract it from your patch and added a separat tichet. From my point of view, this solution is a good fix for #31278.

I split the patch and attached it to the #34714 issue.

Bernhard Rohloff wrote:

I've tried your patch and it worked quite well. The only thing I've missed was some kind of feedback after copying the URL to the clipboard. On all web applications which allowed me to copy stuff to the clipboard I got a toast or little message, that the job has finished. So I felt a bit awkward after clicking the copy link without anything happening.

I think if I put the "Copy link" link inside the Actions dropdown, pressing the copy button will close the Dropdown as feedback that the work is done.
GitHub and Gitlab also put a "Copy link" in the dropdown and do not show the message that the work is completed.
However, if you accidentally click outside the dropdown, the dropdown will close, which may be incomplete feedback in that you don't know if the copy is really complete.

In the patch for #34703#note-2, I have implemented a mechanism to display a message after the copy is completed, so I will try if I can incorporate that into the patch for #34703#note-1.

#6 Updated by Marius BALTEANU about 1 month ago

  • Related to Feature #34714: Move delete button for issues and journals to the dropdown menu added

#7 Updated by Mizuki ISHIKAWA about 1 month ago

Since #34714 was committed, I modified feature-34703-1.patch accordingly.
I also added a System test.

#8 Updated by Go MAEDA about 1 month ago

Bernhard Rohloff wrote:

The only thing I've missed was some kind of feedback after copying the URL to the clipboard. On all web applications which allowed me to copy stuff to the clipboard I got a toast or little message, that the job has finished. So I felt a bit awkward after clicking the copy link without anything happening.

I agree that it would be even better to have feedback when the link is copied.

But how about committing the current patch first, and improving the feedback display in the future? I think the feature is useful even without feedback. And as Mizuki already wrote, the equivalent feature of GitHub and Gitlab also don't show feedback when a link is copied.

#9 Updated by Bernhard Rohloff about 1 month ago

Go MAEDA wrote:

But how about committing the current patch first, and improving the feedback display in the future? I think the feature is useful even without feedback. And as Mizuki already wrote, the equivalent feature of GitHub and Gitlab also don't show feedback when a link is copied.

Of course! It's a useful feature and we should add it to Redmine. A bit of feedback would just be the icing on the cake. :-)

#10 Updated by Go MAEDA about 1 month ago

  • Target version set to Candidate for next major release

#11 Updated by Mizuki ISHIKAWA about 1 month ago

I changed the icon to an image created by combining a copy icon and a link icon.

#12 Updated by Mizuki ISHIKAWA about 1 month ago

Bernhard Rohloff wrote:

Go MAEDA wrote:

But how about committing the current patch first, and improving the feedback display in the future? I think the feature is useful even without feedback. And as Mizuki already wrote, the equivalent feature of GitHub and Gitlab also don't show feedback when a link is copied.

Of course! It's a useful feature and we should add it to Redmine. A bit of feedback would just be the icing on the cake. :-)

I've also written a patch that adds feedback, but I'm a little confused about how to implement it, so I'm thinking of making another issue after this feature is committed.

#13 Updated by Mizuki ISHIKAWA about 1 month ago

Mizuki ISHIKAWA wrote:

I changed the icon to an image created by combining a copy icon and a link icon.

I accidentally attached an old patch.

#14 Updated by Go MAEDA about 1 month ago

  • Target version changed from Candidate for next major release to 4.2.0

Setting the target version to 4.2.0.

#15 Updated by Go MAEDA about 1 month ago

  • Assignee set to Mizuki ISHIKAWA

test/system/copy_to_clipboard_test.rb fails on macOS. Could you fix the test to support macOS? Probably source:trunk/test/system/keyboard_shortcuts_test.rb@20729#L125 is helpful.

[Screenshot]: tmp/screenshots/failures_test_copy_issue_url_to_clipboard.png
F

Failure:
CopyToClipboardSystemTest#test_copy_issue_url_to_clipboard [test/system/copy_to_clipboard_test.rb:40]:
Expected false to be truthy.

bin/rails test test/system/copy_to_clipboard_test.rb:29

[Screenshot]: tmp/screenshots/failures_test_copy_issue_journal_url_to_clipboard.png
F

Failure:
CopyToClipboardSystemTest#test_copy_issue_journal_url_to_clipboard [test/system/copy_to_clipboard_test.rb:54]:
Expected false to be truthy.

bin/rails test test/system/copy_to_clipboard_test.rb:43

#16 Updated by Mizuki ISHIKAWA about 1 month ago

Go MAEDA wrote:

test/system/copy_to_clipboard_test.rb fails on macOS. Could you fix the test to support macOS? Probably source:trunk/test/system/keyboard_shortcuts_test.rb@20729#L125 is helpful.

[...]

I think it will be fixed by applying this patch in addition to the 0001 patch.

#17 Updated by Go MAEDA about 1 month ago

  • Subject changed from Add a link to copy the issue URL and issue journal URL to the clipboard to "Copy link" feature for issue issue journal
  • Status changed from New to Closed
  • Resolution set to Fixed

Committed the patch. Thank you for your contribution.

Users can copy a URL of an issue or an issue journal by clicking "Copy link" in the action menu.

#18 Updated by Go MAEDA about 1 month ago

  • Subject changed from "Copy link" feature for issue issue journal to "Copy link" feature for issue and issue journal

#19 Updated by Go MAEDA 29 days ago

  • Related to Feature #34932: "Copy link" feature for issues list added

Also available in: Atom PDF