Closed
Bug 1395175
Opened 7 years ago
Closed 7 years ago
Shortened Links in the JSON View are broken
Categories
(DevTools :: JSON Viewer, defect)
Tracking
(firefox-esr52 unaffected, firefox55 unaffected, firefox56 unaffected, firefox57 affected)
RESOLVED
DUPLICATE
of bug 1394094
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox55 | --- | unaffected |
firefox56 | --- | unaffected |
firefox57 | --- | affected |
People
(Reporter: rhubscher, Unassigned)
Details
If you open the following JSON with the JSON view:
{"message": "Last beta version is 56.0b7 and last devedition is 56.0b6",
"link": "https://product-details.mozilla.org/1.0/firefox_versions.json",
"status": "missing"}
You will see that the link is reduced.
However if you click on it you will be redirected to the reduced version which obviously doesn't work.
https://product-details.xn--0-p10i/firefox_versions.json
Has STR: --- → yes
status-firefox55:
--- → unaffected
status-firefox56:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Component: General → Developer Tools: JSON Viewer
Comment 1•7 years ago
|
||
Hi Honza,
This is happening only when the link node is in collapsed mode and it is happening because of the cropLimit specified here.
https://dxr.mozilla.org/mozilla-central/source/devtools/client/jsonview/components/json-panel.js#83
As part of https://bugzilla.mozilla.org/show_bug.cgi?id=1347833, we changed to have the cropLimit defaulting to 1024.
Hence I feel that we can safely remove { cropLimit: 50 } from Line83 which would solve the issue.
Your thoughts on the same?
Flags: needinfo?(odvarko)
Comment 2•7 years ago
|
||
(In reply to Abhinav Koppula from comment #1)
> Hi Honza,
> This is happening only when the link node is in collapsed mode and it is
> happening because of the cropLimit specified here.
> https://dxr.mozilla.org/mozilla-central/source/devtools/client/jsonview/
> components/json-panel.js#83
>
> As part of https://bugzilla.mozilla.org/show_bug.cgi?id=1347833, we changed
> to have the cropLimit defaulting to 1024.
> Hence I feel that we can safely remove { cropLimit: 50 } from Line83 which
> would solve the issue.
The new crop-limit (from bug 1347833) is related to properties-view.js
(devtools/client/netmonitor/src/components/properties-view.js)
which is not used by the JSON Viewer.
Instead of increasing the crop limit we could rather solve the basic issue and not open cropped link. The underlying StringRep [1] has `openLink` property and we could use that to provide 'smart' implementation understanding that clicking on cropped link dosn't use the cropped text as the URL, but the original value passed into StringRep. The implementation could be also part of StringRep object, so this issue is fixed across the DevTools UI.
@Nicolas, what do you think?
Honza
[1] https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-reps/src/reps/string.js#L89
Flags: needinfo?(odvarko) → needinfo?(nchevobbe)
Comment 3•7 years ago
|
||
Hello everyone,
The work for that is tracked on the Reps repo on github : https://github.com/devtools-html/devtools-core/issues/616 .
IMO We should keep the crop limit as it is and fix how we build the href attribute.
Flags: needinfo?(nchevobbe)
Comment 4•7 years ago
|
||
Yes, please don't hack around the issue by changing the crop limit. A similar issue used to affect URL-containing attributes in the DOM inspector; correcting it everywhere such contractions/truncations are made would be great.
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•