Closed Bug 1651649 Opened 4 years ago Closed 3 years ago

Use toggle button for switching between raw and formatted response view

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: Honza, Assigned: sebo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image image.png

Switching between "raw text" and "formated" (e.g. JSON) should be done using a Toggle button. The same we are using for switching between raw and formatted headers.
(we can also use the same label "Raw")

See the attached screenshot

Honza

This is a WIP patch. It replaces the accordion widget by a simple headline with a toggle button at the end.

Open points are:

  • Raw view is currently default, even when there's a formatted view. How to change that?
  • Headline name is now always "Response Payload". Is that ok or should it change to "JSON", "HTML", and other types accordingly?
  • Formatting isn't perfect yet (especially regarding the size of the source container)
  • Tests need to be created/updated

Honza, can you help me here?

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED

I like that patch!

(In reply to Sebastian Zartner [:sebo] from comment #2)

  • Raw view is currently default, even when there's a formatted view. How to change that?

@Bomsy can you help here, please?

  • Headline name is now always "Response Payload". Is that ok or should it change to "JSON", "HTML", and other types accordingly?

I agree with the later, the headline name should change dynamically according to the state of the toggle and displayed content

  • Formatting isn't perfect yet (especially regarding the size of the source container)

Yep, I noticed that the scrollbar is broken for raw view and the vertical one too long for the JSON view.

Honza

Flags: needinfo?(hmanilla)

I've added comments in Phabricator.

Flags: needinfo?(hmanilla)

Just a quick update: I already fixed all the points you mentioned in Phabricator and here and also added the switch to the WebSocket data display as that's also part of the response view.

I am still working on updating all the tests that cover the response view. I'll try to finish up the patch the next few days.

Sebastian

That's great sebo! Thanks for the update.

Attachment #9200779 - Attachment description: Bug 1651649 - Use toggle button for switching between raw and formatted response view. r=honza → Bug 1651649 - Use toggle button for switching between raw and formatted response view. r=bomsy
See Also: → 1693147
Attachment #9200779 - Attachment description: Bug 1651649 - Use toggle button for switching between raw and formatted response view. r=bomsy → Bug 1651649 - Use toggle button for switching between raw and formatted response view. r=bomsy,honza
Pushed by sebastianzartner@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/58fcc8f7377a
Use toggle button for switching between raw and formatted response view. r=Honza,bomsy
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Regressions: 1713301
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: