Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Provide way to copy a link to a comment for drupal.org issue link filter #49

Open
subhojit777 opened this issue Aug 24, 2016 · 10 comments

Comments

@subhojit777
Copy link
Member

From @davereid on September 26, 2013 21:34

I always have to copy-paste the link to a comment like https://drupal.org/node/2022535#comment-7903865 and have to manually convert it to [#2022535-4]. It would be nice if Dreditor could provide me a way to copy this pre-converted to use with the Drupal.org issue-linking filter.

Copied from original issue: unicorn-fail/dreditor#23

@subhojit777
Copy link
Member Author

From @sun on September 26, 2013 21:49

Auto-completion on the URL will turn it into [#issue] already.

The problem with #comment-7903865 is that the project issue input filter expects the relative number of a comment within an issue (i.e., -4), as opposed to the comment ID.

In order to retrieve 4, we'd have to

  1. actually request the page https://drupal.org/node/2022535 under the hood,
  2. parse the DOM,
  3. look up the container that contains the comment ID as a HTML ID, and from there,
  4. traverse to the element that happens to contain the #4 output
  5. parse that into 4

Alternatively, of course, there's the still relatively new JSON representation for issues on drupal.org, which might make things easier. But off-hand, I don't know whether that contains the relative comment counter for each comment.

@subhojit777
Copy link
Member Author

From @davereid on September 26, 2013 21:56

I'm not asking for auto-parsing. I'm asking for a link that exactly has <a href="[#issue-comment-num]"> that I can click to copy the link on the issue that has the comment itself.

@subhojit777
Copy link
Member Author

From @davereid on September 26, 2013 21:57

To clarify, I never usually expect to just know the issue and comment I want to reference. I have that issue and comment open, and want to copy-paste a link from that comment itself into a new issue.

@subhojit777
Copy link
Member Author

From @sun on September 26, 2013 22:4

Oh! That makes a lot of sense. Thanks for clarifying!

AFAIK, HTML5 enabled clipboard access - can we leverage that?

(FWIW, there has been a closely related issue in the drupal.org issue queue)

@subhojit777
Copy link
Member Author

From @andypost on September 27, 2013 0:50

+1 on that, also I'd like to point that when issue have more then 1 page the link to comment id broken (as all d7 have) - no page added to permalink

@subhojit777
Copy link
Member Author

From @MarkCarver on September 27, 2013 3:5

Leverage HTML 5 clipboard on left click sound good? FWIW, I still like the idea of (and think it may be necessary) to use project issue JSON to get the comment number for autocompletion detection of the full comment url (https://drupal.org/node/000000#comment-00000000). Instead of just relying solely on using the clipboard to copy [#000000-0] when clicking on a comment link (ie: think of other sites or docs that may contain links you want to copy over).

@subhojit777
Copy link
Member Author

From @MarkCarver on September 27, 2013 21:17

This may perhaps be a separate issue, but closely related. I think issue autocompletion should automatically append the @ as well to show who (if anyone) is assigned: https://drupal.org/node/2094409 -> [#2094409@]

@subhojit777
Copy link
Member Author

From @sun on May 31, 2014 19:35

Some research results:

zeroclipboard/zeroclipboard#171 intends to update the library to utilize the scriptable copy event that has been added to the Clipboard API spec.

Two interesting gists:

@subhojit777
Copy link
Member Author

From @sirtet on March 20, 2015 8:39

Wouldn't it make even more sense to put a converter from pasted url's to proper issue links directly into the responsible drupal module? Project, or issue...?
Or, is it that dreditor is just moving along faster?

@subhojit777
Copy link
Member Author

From @MarkCarver on August 12, 2016 22:21

Dreditor is being decommissioned due to the lack of availability of current maintainers and the fact that Drupal.org is becoming more feature rich at a much faster rate than Dreditor itself now.

This decision was also partially made due to the amount of work (complete rewrite) it would take to create an "official" Firefox extension (#256).

If you already have the extension installed, it should continue working for a while until, inevitably, the markup on Drupal.org changes. It will no longer be updated.

We understand that many of you love this extension, as do we. This isn't the end, in fact, it's a much brighter beginning. All the things we love about Dreditor can, and should, be moved into Drupal.org natively.

For more information, please follow: https://www.drupal.org/node/2779729

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant