-
@servicedesk Can you analyse these requirements and provide some context or guidance?
Don't assume. Ask high-level clarifying questions if needed.
- Numbered questions (1, 2, 3, etc)
- Lettered answer options (A, B, C, etc)
- Pros and Cons? Your recommendation?
-
@zaakiy Analysis and clarifying questions before we implement this:
Current behaviour
Comment/activity permalink icons (issue comments, PR comments, code-comment replies) use an in-page hash such as
#IssueComment-<id>. Left-clicking updates the location hash and scrolls that element into view — even when the comment is already on screen. Absolute permalinks already exist server-side viaUrlService(for example…/~issues/<n>#IssueComment-<id>, and similarly for PRs / code comments), and OneDev already has a reusableCopyToClipboardLinkpattern with “copied” feedback.Recommendation
Treat the chain/link icon next to comments as a copy-permalink control: on left-click, copy the absolute URL and do not scroll. Keep a real
href(full permalink) so right-click / open-in-new-tab still work, andpreventDefaultonly on a normal left-click. Start with comment/activity icons only — not every markdown heading anchor — unless you want broader scope.Questions
-
Scope — which anchors should change?
- A. Only comment/activity permalink icons (issue, PR, code-comment replies) — recommended
- B. Also markdown heading anchors in rendered content
- C. All in-page
#…links product-wide
-
What should be copied?
- A. Absolute URL including server root (
https://…/~issues/123#IssueComment-456) — recommended (pasteable elsewhere) - B. Site-relative path + hash (
/project/~issues/123#…) - C. Hash only (
#IssueComment-456)
- A. Absolute URL including server root (
-
Address bar / scroll on left-click?
- A. Copy only; no scroll and no hash change — recommended
- B. Copy and update the URL hash, but suppress scroll
- C. Copy and keep today’s navigate/scroll behaviour
-
User feedback after copy?
- A. Brief tippy/toast (“Link copied” / reuse existing copy-to-clipboard feedback) — recommended
- B. No visible feedback
-
Modifier / secondary actions?
- A. Left-click copies; keep full permalink as
hrefso middle-click / “Open in new tab” / “Copy link address” still work — recommended - B. Replace with a button that only copies (no navigable
href)
- A. Left-click copies; keep full permalink as
Please reply with your choices (e.g.
1A, 2A, 3A, 4A, 5A) or note any differences. -
-
- A & B
- B - but ask @robin for confirmation
- A
- A
- A
-
@zaakiy Recorded your choices:
- Scope: A & B — comment/activity permalink icons and markdown heading anchors
- Copy format: B (site-relative path + hash) — pending confirmation
- Left-click: A — copy only; no scroll and no hash change
- Feedback: A — brief tippy/toast
- Secondary actions: A — keep full permalink as
hrefso middle-click / open-in-new-tab still work
@robin For (2), zaakiy prefers a site-relative URL (e.g.
/project/~issues/123#IssueComment-456) over an absolute URL including the server root. Relative stays portable if the site URL changes; absolute is more pasteable into email/chat outside the instance. Prefer B (site-relative) or A (absolute)? -
Click the anchor link will update browser url to include the anchor, which is the standard behavior of clicking a link. Copying it to clipboard violates this convention.
-
Previous Value Current Value Open
Closed
-
@robin in that case, I would kindly request a copy to clipboard button next to the anchor link. Which would copy the comment URL into the clipboard
-
Previous Value Current Value Closed
Open
| Type |
Improvement
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
When an anchor link is clicked, such as for a comment, there is no need to navigate to it since it's already showing in the current view. Therefore, a better action would be to copy the link to the clipboard, instead of navigating to it which forces a scroll down to the anchor point and disturbs the UX of the user.
This enables the link to be immediately usable and pasteable elsewhere without requiring a right click and then copy.