Open
Bug 1452678
Opened 6 years ago
Updated 2 months ago
Use devtools/shared/link everywhere where we open links in a tab
Categories
(DevTools :: General, enhancement, P3)
DevTools
General
Tracking
(Not tracked)
NEW
People
(Reporter: ochameau, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
Bug 1444301 just introduced an helper module to easily open a link: https://searchfox.org/mozilla-central/source/devtools/client/shared/link.js Which can be used like this: const {openLink} = require("devtools/client/shared/link"); ... openLink("https://developer.mozilla.org/docs/Tools", toolbox); The dependency on toolbox object may be dropped per bug 1444301 comment 74. Today, there is about 20 occurences where we manually call openUILink: https://searchfox.org/mozilla-central/search?q=openUILinkIn(&case=false®exp=false&path=devtools
Reporter | ||
Updated•6 years ago
|
Summary: Use devtools/shared/link → Use devtools/shared/link everywhere where we open links in a tab
Comment 1•6 years ago
|
||
After Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1374741, they were all renamed to openWebLinkIn https://searchfox.org/mozilla-central/search?q=openWebLinkIn&case=false®exp=false&path=devtools (but sadly devtools/client/shared/link must have missed the migration patch)
See Also: → 1374741
Comment 2•6 years ago
|
||
And openTrustedLink as well. https://searchfox.org/mozilla-central/search?q=openWebLinkIn&case=false®exp=false&path=devtools Should we complexify the module to handle both? And to support the relatedToCurrent argument (which allows to open a new tab next to the current tab instead of as the last one)
Probably worth exposing both openWebLink and openTrustedLink versions, to match the underlying browser APIs. The main benefit of this link module to me is centralizing the boilerplate to find these functions from a DevTools context. (Could also add relatedToCurrent if we have a need for it.)
Comment 4•6 years ago
|
||
Looks like it broke already.
Comment 5•6 years ago
|
||
Sorry, see Bug 1453495
Depends on: 1453423
(Bug 1453423 is handling the immediate breakage here, hopefully landing soon.)
Updated•6 years ago
|
Severity: normal → enhancement
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 7•4 years ago
|
||
Julian, is this work completed?
I don't see any usage of openUILinkIn
(only in a few comments)
https://searchfox.org/mozilla-central/search?q=openUILinkIn&path=devtools
Honza
Flags: needinfo?(jdescottes)
Priority: -- → P3
Comment 8•4 years ago
|
||
The methods have been renamed: https://searchfox.org/mozilla-central/search?q=open.*LinkIn%5C%28&path=devtools&case=false®exp=true
Flags: needinfo?(jdescottes)
Updated•2 years ago
|
Severity: normal → S3
Comment hidden (spam) |
Updated•2 months ago
|
Attachment #9381624 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•