Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

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

Closed
davereid opened this issue Sep 26, 2013 · 11 comments
Closed
Milestone

Comments

@davereid
Copy link
Contributor

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.

@sun
Copy link
Contributor

sun commented Sep 26, 2013

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.

@davereid
Copy link
Contributor Author

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.

@davereid
Copy link
Contributor Author

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.

@sun
Copy link
Contributor

sun commented Sep 26, 2013

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)

@andypost
Copy link

+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

@markhalliwell
Copy link
Member

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).

@markhalliwell
Copy link
Member

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@]

@sun
Copy link
Contributor

sun commented May 31, 2014

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:

@sun sun added this to the 1.3.0 milestone Jul 3, 2014
@sirtet
Copy link

sirtet commented Mar 20, 2015

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?

@markhalliwell
Copy link
Member

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

@subhojit777
Copy link

This issue was moved to dreditor/dreditor#49

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

6 participants