Bug 170895

Summary: Web Inspector: Show pause reason for "All Requests" XHR breakpoint
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
[Image] Debugger sidebar (before)
none
[Image] Debugger sidebar (after)
none
Patch none

Description Matt Baker 2017-04-16 16:45:45 PDT
Summary:
Show pause reason for "All Requests" XHR breakpoint. Currently the frontend skips updating the UI when pauseData.breakpointURL === "".
Comment 1 Radar WebKit Bug Importer 2017-04-16 16:46:44 PDT
<rdar://problem/31649963>
Comment 2 Matt Baker 2017-04-16 16:49:34 PDT
Created attachment 307246 [details]
Patch
Comment 3 Matt Baker 2017-04-16 16:56:25 PDT
Created attachment 307247 [details]
Patch
Comment 4 Matt Baker 2017-04-16 16:58:48 PDT
Created attachment 307248 [details]
[Image] Debugger sidebar (before)
Comment 5 Matt Baker 2017-04-16 16:59:21 PDT
Created attachment 307249 [details]
[Image] Debugger sidebar (after)
Comment 6 Joseph Pecoraro 2017-04-17 12:00:43 PDT
Comment on attachment 307247 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307247&action=review

r=me

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1052
> +                } else {

console.assert(pauseData.breakpointURL === "", "Should be the All Request breakpoint which has an empty URL");

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1053
> +                    this._pauseReasonTextRow.text = WebInspector.UIString("XHR sent: %s").format(pauseData.url);

I don't think "XHR sent" is correct. We haven't yet sent the XHR, we are about to send it. As we saw last week, you should be able to change this XHR before it is actually sent.

Some ideas:

    "Sending: %s"
    "Requesting: %s"
    "Sending Request: %s"
    "URL: %s"
Comment 7 Matt Baker 2017-04-17 12:26:51 PDT
(In reply to Joseph Pecoraro from comment #6)
> Comment on attachment 307247 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=307247&action=review
> 
> r=me
> 
> > Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1052
> > +                } else {
> 
> console.assert(pauseData.breakpointURL === "", "Should be the All Request
> breakpoint which has an empty URL");
> 
> > Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1053
> > +                    this._pauseReasonTextRow.text = WebInspector.UIString("XHR sent: %s").format(pauseData.url);
> 
> I don't think "XHR sent" is correct. We haven't yet sent the XHR, we are
> about to send it. As we saw last week, you should be able to change this XHR
> before it is actually sent.
> 
> Some ideas:
> 
>     "Sending: %s"
>     "Requesting: %s"
>     "Sending Request: %s"
>     "URL: %s"

These are all good suggestions. I choose "Requesting", since it's the verb used to label the "All Requests" breakpoint.
Comment 8 Matt Baker 2017-04-17 12:33:31 PDT
Created attachment 307288 [details]
Patch
Comment 9 Joseph Pecoraro 2017-04-17 13:10:49 PDT
Comment on attachment 307288 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307288&action=review

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1057
> +                this._pauseReasonTextRow.element.title = pauseData.url;

Is there any reason to set the tooltip when it matches the current text?
Comment 10 Matt Baker 2017-04-17 13:20:25 PDT
(In reply to Joseph Pecoraro from comment #9)
> Comment on attachment 307288 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=307288&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:1057
> > +                this._pauseReasonTextRow.element.title = pauseData.url;
> 
> Is there any reason to set the tooltip when it matches the current text?

Long URLs can be truncated.
Comment 11 Matt Baker 2017-04-17 13:21:20 PDT
The Pause Reason section could do a better job of displaying long URLs/exception text.
Comment 12 WebKit Commit Bot 2017-04-17 13:37:52 PDT
Comment on attachment 307288 [details]
Patch

Clearing flags on attachment: 307288

Committed r215427: <http://trac.webkit.org/changeset/215427>
Comment 13 WebKit Commit Bot 2017-04-17 13:38:18 PDT
All reviewed patches have been landed.  Closing bug.