Closed Bug 1757235 Opened 3 years ago Closed 1 years ago

Allow to search within raw network response

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sebo, Assigned: colin.cazabet)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

While the Netmonitor allows to search within all request data, there is currently no way to search only within a specific response text.

There should be an option within the Response view to search within the response text.

A solution to this would be a search bar that opens within the Response view when pressing Ctrl+F and/or via an option within the context menu.

Sebastian

Thank you for the report Sebastian.

Do you think Bug 1553201 is a dup?

Severity: -- → S3
Flags: needinfo?(sebastianzartner)
Priority: -- → P3

I see bug 1553201 to introduce a UI for searching within the formatted JSON response, while this bug is explicitly for a UI for searching within the raw response.

The UI for searching may end up to be the same, e.g. a search bar as described above, though I imagine this one here to highlight the value within the raw response while in the other bug we may end up filtering the JSON tree view.

Sebastian

Flags: needinfo?(sebastianzartner)

Ok, thank you.

Also note, that it's possible to search all (raw) response bodies using the Search side panel. The existing search logic should be considered when working on this feature.

Honza

Hello,

I'm interested to work on this, if I understand well, we need to:

  • add a searchbar on the response view when ctrl+f is pressed (or a button in the context menu)
  • highlight the elements that match in the raw response (if raw is not checked in the response view, what should we do ? should we force it ?)
  • go to the next match when enter is pressed
  • hide the searchbar on escape

Thank you
Colin

Attached image obrazek.png

Hey Colin,
yes, your list looks great, thanks for helping with this!

add a searchbar on the response view when ctrl+f is pressed (or a button in the context menu)

There is already a search bar in the Debuger panel (opens on Ctrl+F), see the attached screenshot. We should use the same thing, so the UI/UX is consistent across DevTools UI. This should also help us to avoid dupping a lot of code.

https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/components/Editor/SearchBar.js

Is there anything blocking us from re-using this in the Network panel?
I think that both, Ctrl+F and Context menu should be supported to open the search bar.
We should also move the SearchBar component to devtools/client/shared/components/search directory.

highlight the elements that match in the raw response
go to the next match when enter is pressed
hide the searchbar on escape

Yes, look at the Debugger implementation, the UX should be the same (CodeMirror might do some of that I guess).

if raw is not checked in the response view, what should we do ? should we force it ?

Yes, forcing to raw (and keeping raw even after the search bar is closed)

Honza

Should I assign you to this bug?

Flags: needinfo?(colin.cazabet)

Hello jan,

thank you for all the details !
I think we can indeed reuse this component on the network panel, I'll ask here if I encounter some problems.

Yes can you please assign it to me ?

Thank you,
Colin

Flags: needinfo?(colin.cazabet)

Perfect, assigned to you.

Assignee: nobody → colin.cazabet
Status: NEW → ASSIGNED

Sorry Colin, I missed you were working on that and I landed something that looks similar in Bug 1779164
I'm only deferring the search handling to CodeMirror, so it doesn't look the same as in the debugger though.
Honza, should we close this bug or do we want to use it to have something more similar to the debugger UI ?

Go home Release mgmt bot, you're drunk!

re-setting Colin as assignee since we submitted a patch yesterday

Assignee: nobody → colin.cazabet

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Status: NEW → ASSIGNED

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: colin.cazabet → nobody
Status: ASSIGNED → NEW
Assignee: nobody → colin.cazabet
Status: NEW → ASSIGNED

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: colin.cazabet → nobody
Status: ASSIGNED → NEW
Assignee: nobody → colin.cazabet
Status: NEW → ASSIGNED

Honza or Bomsy, Can you check Colin's question at https://phabricator.services.mozilla.com/D152597#5945360 ? as well as comment 11 from Nicolas. Is this bug still needed?

Flags: needinfo?(odvarko)
Flags: needinfo?(hmanilla)

Had a chat offline with Honza, and we think the fix by Nicholas from Bug 1779164 works nicely for now. We just need a light simple search now.

Thanks for your time spent on this Colin.

I'll close this now.

Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Flags: needinfo?(odvarko)
Flags: needinfo?(hmanilla)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: