Closed Bug 1779688 Opened 3 years ago Closed 10 months ago

Implement "Copy Link to Highlight" links

Categories

(Firefox :: Menus, enhancement, P2)

Firefox 102
enhancement

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: mjurgens, Assigned: jabramson)

References

(Depends on 2 open bugs, Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: parity-chrome, parity-safari, Whiteboard: [fidefe-quality-foundations])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

It would be extremely useful if Firefox would support Chrome's "Copy Link to Highlight" feature.

Leaving this feature out of Firefox gives users one more reason to switch to a Chromium-based browser and stay there.

https://support.google.com/chrome/answer/10256233?hl=en&co=GENIE.Platform%3DDesktop

This appears to have been implemented as an extension here https://addons.mozilla.org/en-US/firefox/addon/link-to-text-fragment/ but is only somewhat useful as it does not have guaranteed ubiquity - you need to have both parties involved in the link sharing/viewing with this ability.

What is the best way to submit this enhancement request for all Firefox platforms/editions/versions/platforms eg Firefox for Android?
Duplicate item and change Product/platform?

As previously stated this is most useful if it is ubiquitous

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions
Component: Untriaged → General
Depends on: text-fragments
Product: WebExtensions → Firefox

Note that this depends on bug 1753933 for us to be able to load the generated links, and the frontend code, when it exists, should verify that the document policy for the page allows loading text fragment links before offering to generate them.

Status: UNCONFIRMED → NEW
Component: General → DOM: Navigation
Ever confirmed: true
Product: Firefox → Core

Per comment 3, this is a front-end feature which depends on bug 1753933 for the underlying platform support.

Component: DOM: Navigation → Menus
Product: Core → Firefox

I would add that when Chrome generates "Copy link to Highlight" URLs, like this one: https://ised-isde.canada.ca/cc/lgcy/popMsg.html#bsnssnmbr:~:text=The%20Business%20Number%20(BN)%20is%20part, it also includes the anchor, but Firefox does not recognize the anchor either (presumably because it is including everything after the '#'?).

Perhaps an intermediate step is to support just jumping to anchor, while waiting for the full feature.

See Also: → 1890733

Hi Kyle,

thank you for the suggestion. I've filed Bug 1890733 for this, this should ride the next release train.

Could I also recommend alongside this feature the complimentary "Remove highlight" context menu item? It simply unhighlights the fragment when visiting a page with one, much like the Chrome implementation.

Duplicate of this bug: 1922443
Duplicate of this bug: 1905508
Severity: -- → N/A
Summary: No Support for "Copy Link to Highlight" links → Implement "Copy Link to Highlight" links

https://bugzilla.mozilla.org/show_bug.cgi?id=1779688#a71336434_430528

cpeterson@mozilla.com, this isn't a duplicate. Fragment directives direct the user to a string, which can vary at any time for any reason. IDs on a lot pages are deliberarely persistent.

No longer duplicate of this bug: 1905508
See Also: → 1905508
Assignee: nobody → jabramson
Priority: -- → P2
Whiteboard: [fidefe-quality-foundations]
Duplicate of this bug: 1939647

This patch adds context menu entries to create a link to the current selection
of a site ("Text Fragment") and copies it to the clipboard.
Furthermore, if any Text Fragments are visible on the page,
it adds a context menu entry to remove these highlights.

This patch was mostly written by :jabramson.

Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21c27f2ca5fa Add copy text fragment context menu items. r=mconley,fluent-reviewers,bolsson
Regressions: 1946537

Backed out for causing mochitests failures in browser_copy_link_to_highlight.js.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/base/content/test/contextMenu/browser_copy_link_to_highlight.js | uncaught exception - NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIIOService.createExposableURI] at copyStrippedLink@chrome://browser/content/nsContextMenu.sys.mjs:2314:19
Flags: needinfo?(jjaschke)
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/13e62ea850a7 Add copy text fragment context menu items. r=mconley,fluent-reviewers,bolsson

Backed out for causing devtools failures in browser_jsterm_autocomplete_mapped_variables.js.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser/browser_jsterm_autocomplete_mapped_variables.js | Autocomplete popup displays original variable name when entering a complete variable name -
Flags: needinfo?(jjaschke)
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed5e69954117 Add copy text fragment context menu items. r=mconley,fluent-reviewers,bolsson
Flags: needinfo?(jjaschke)
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

Please consider requesting a release note for this feature.

Flags: needinfo?(jjaschke)

This is still behind dom.text_fragments.create_text_fragment.enabled which is disabled by default everywhere, so maybe too early to have a release note?

Yes, this is currently behind a pref and will likely require QA testing before being released.

Flags: needinfo?(jjaschke)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: