Closed Bug 1514750 Opened 5 years ago Closed 5 years ago

Network monitor params plain text

Categories

(DevTools :: Netmonitor, defect, P3)

64 Branch
defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: reachrammy, Assigned: hemakshis, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: good-first-bug)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

1.Open the network monitor.
2. Make a POST request with JSON Body. 
3. Go to Params Tab.
4. I want to copy the post body but it is displayed as JSON but no text view. 


Actual results:

I copied and pasted to external text editor and I dont get to paste the content completely. 


Expected results:

How the response has a plain text view, Params should also have plain text view.
Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Thanks for the report! I can reproduce that on my machine.


Some instructions for anyone interested in fixing this:

  1. Here is the place where the panel content is generated:
    https://searchfox.org/mozilla-central/rev/76fe4bb385348d3f45bbebcf69ba8c7283dfcec7/devtools/client/netmonitor/src/components/ParamsPanel.js#139

  2. It looks like both JSON_SCOPE_NAME and PARAMS_POST_PAYLOAD should be used.

  3. We need a test for this, look e.g. here:
    https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_post-data-02.js

Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: good-first-bug
Priority: -- → P3
Whiteboard: good-first-bug

Hi @honza

I would like to take up this issue. Just need some help in reproducing it (a way to make a dummy JSON post request).

Thank you!
Hemakshi

Flags: needinfo?(odvarko)

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #2)

I would like to take up this issue. Just need some help in reproducing it (a way to make a dummy JSON post request).

I create a simple test page here:
http://janodvarko.cz/tests/bugzilla/1514750/

Click the button on the page to generate JSON POST request.

Thanks!
Honza

Assignee: nobody → sachdev.hemakshi
Mentor: odvarko
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Attached file Bug #1514750 - First Commit (obsolete) —

The current changes, shows the JSON Body in a plain text view in the Params Panel

I think this test resembles more to our requirements. What do you think?

Flags: needinfo?(odvarko)

There are some failures on Try when I apply your patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d82abe47a8379a74f2ac7162a493c3be164f76e&selectedJob=226181532

Probably just related to the UI change.

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #5)

I think this test resembles more to our requirements. What do you think?

Yep, looks like we should adopt it to test that the JSON plain text is there.

Honza

Flags: needinfo?(odvarko) → needinfo?(sachdev.hemakshi)

(In reply to Jan Honza Odvarko [:Honza] (need-info? me) from comment #6)

There are some failures on Try when I apply your patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d82abe47a8379a74f2ac7162a493c3be164f76e&selectedJob=226181532

Probably just related to the UI change.

So to resolve these failures we need to change the tests...? * I guess *

Flags: needinfo?(sachdev.hemakshi) → needinfo?(odvarko)

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #7)

So to resolve these failures we need to change the tests...? * I guess *
Yes

Honza

Flags: needinfo?(odvarko)
Attachment #9039574 - Attachment is obsolete: true

This is ready to land, thanks!
Honza

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #10)

This is ready to land, thanks!
Honza

Thank you :)

So, what should be the next step? Should I add a checkin-needed keyword or something in Phabricator?

Flags: needinfo?(odvarko)

I just landed that manually through Phabricator.

Honza

Flags: needinfo?(odvarko)
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ced3fcdd37c
Show JSON POST payload as plain text view also. r=Honza

Cool! Thank you so much :)

Hemakshi

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: