Bug 170895 - Web Inspector: Show pause reason for "All Requests" XHR breakpoint
Summary: Web Inspector: Show pause reason for "All Requests" XHR breakpoint
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-16 16:45 PDT by Matt Baker
Modified: 2017-04-17 13:38 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.92 KB, patch)
2017-04-16 16:49 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (5.99 KB, patch)
2017-04-16 16:56 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Image] Debugger sidebar (before) (320.25 KB, image/png)
2017-04-16 16:58 PDT, Matt Baker
no flags Details
[Image] Debugger sidebar (after) (261.61 KB, image/png)
2017-04-16 16:59 PDT, Matt Baker
no flags Details
Patch (6.21 KB, patch)
2017-04-17 12:33 PDT, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.