Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUI for XHR Breakpoints #6934
Conversation
AnshulMalik
requested a review
from
flodolo
as a
code owner
Sep 5, 2018
flodolo
reviewed
Sep 6, 2018
@@ -497,6 +497,10 @@ expressions.errorMsg=Invalid expression… | |||
expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints | |||
xhrBreakpoints.placeholder=Break when url contains |
This comment has been minimized.
This comment has been minimized.
@@ -497,6 +497,10 @@ expressions.errorMsg=Invalid expression… | |||
expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints | |||
xhrBreakpoints.placeholder=Break when url contains | |||
xhrBreakpoints.label=Add xhr breakpoint |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
That's great @AnshulMalik ! The only thing that puzzles me a bit is the "leave input empty to break on all XHR".
or something better, but that a clear distinction between breaking on everything and allowing for URL matching. |
This comment has been minimized.
This comment has been minimized.
@nchevobbe Yeah, that sounds more practical. Since the designs were not yet ready, so I went ahead with what chrome does. |
This comment has been minimized.
This comment has been minimized.
When @AnshulMalik casually submits a PR for an incredibly awesome feature: I'll take an in-depth look at this tomorrow. Obviously this is awesome but wasn't well spec'd out by us so there will likely be lots of feedback. In the mean time...this is amazing! Thank you! |
darkwing
changed the title
[WIP] UI for XHR Breakpoints
UI for XHR Breakpoints
Sep 6, 2018
darkwing
added
the
pr-wip
label
Sep 6, 2018
flodolo
approved these changes
Sep 7, 2018
flodolo left a comment
String-wise it looks good, thanks for updating it. Letting code review to the actual devs ;-) |
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
f54ab7f
to
72bfa24
Sep 13, 2018
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
7e3a6b6
to
10ba497
Sep 22, 2018
This comment has been minimized.
This comment has been minimized.
A few behavioral things I'm seeing:
These are all minor things; I think if you get time to clean this up a bit (i.e. removing commented code), we can try to land something. Great work so far @AnshulMalik ! |
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
10ba497
to
400d333
Sep 25, 2018
This comment has been minimized.
This comment has been minimized.
Hey @darkwing, thanks for the comments, here my my thoughts:
|
This comment has been minimized.
This comment has been minimized.
Adding in an older mockup from @violasong: Obviously we dont' need to do all of this at once. It might be nice in this first PR if we can add the GET/POST dropdown for adding the breakpoint though. |
This comment has been minimized.
This comment has been minimized.
Just to clarify: The mockup should not inform the UI or requirements for this first implementation. Goal is a simple UI, similar to existing XHR breakpoint implementations (aka Chrome). We will iterate on the UI in the future, @mcroud is working taking over the design work. Just to re-iterate the basic requirements:
Do they make sense? |
This comment has been minimized.
This comment has been minimized.
Per @digitarald's comment, the only thing missing is a "pause on all XHRs"; maybe in the short term we can simply add a checkbox like we do for "Pause on Exceptions". Up for it @AnshulMalik ? This is sooooooo close! |
This comment has been minimized.
This comment has been minimized.
Chrome offers a checkbox for this, so maybe. The alternative is would be an XHR breakpoint without a URL filter (which Chrome has before I think). How are empty XHR breakpoints treated in the current solution? |
This comment has been minimized.
This comment has been minimized.
Okay, we can have a checkbox for pause on all xhr, |
This comment has been minimized.
This comment has been minimized.
Looks like the latest behavior on Chrome removes empty XHR breakpoints. |
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
14d5bfb
to
0f7e340
Oct 9, 2018
darkwing
reviewed
Oct 9, 2018
@@ -513,6 +513,14 @@ expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
expressions.key=CmdOrCtrl+Shift+E | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints |
This comment has been minimized.
This comment has been minimized.
darkwing
force-pushed the
AnshulMalik:xhr
branch
from
0f7e340
to
4720629
Oct 10, 2018
flodolo
reviewed
Oct 10, 2018
# LOCALIZATION NOTE (expressions.errorMsg): Error text for expression | ||
# input element | ||
expressions.errorMsg=Invalid expression… | ||
expressions.label=Add watch expression | ||
expressions.accesskey=e | ||
expressions.key=CmdOrCtrl+Shift+E | ||
|
||
# LOCALIZATION NOTE (xhrBreakpoints): The pause on any xhr breakpoints headings |
This comment has been minimized.
This comment has been minimized.
flodolo
Oct 10, 2018
The string ID referenced in the comment should be xhrBreakpoints.header
, also XHR (uppercase) in the note itself for consistency.
This comment has been minimized.
This comment has been minimized.
I've rebased and fixed a header issue. @AnshulMalik Would you be able to make a quick mochitest or two for this functionality? i.e. add an xhr breakpoint and ensure it pauses when hit? |
This comment has been minimized.
This comment has been minimized.
Created a PR here, to allow the functionality to work firefox-devtools/devtools-core#1098 |
This comment has been minimized.
This comment has been minimized.
Current to do:
|
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
2 times, most recently
from
ebb82cf
to
7bc0a4d
Oct 18, 2018
AnshulMalik
added some commits
Jul 24, 2018
AnshulMalik
and others
added some commits
Sep 12, 2018
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
4 times, most recently
from
c34f8a4
to
c730fff
Oct 18, 2018
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
c730fff
to
3ffbd69
Oct 18, 2018
darkwing
reviewed
Oct 18, 2018
const dbg = await initDebugger("doc-xhr.html"); | ||
await waitForSources(dbg, "fetch.js"); | ||
await dbg.actions.setXHRBreakpoint("doc", "GET"); | ||
debugger; |
This comment has been minimized.
This comment has been minimized.
darkwing
Oct 18, 2018
Contributor
Is this supposed to be here? Shouldn't the pause happen from setting the breakpoint?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OK, cool, manually tested and this is totally in the right direction. Yay! A few things:
|
AnshulMalik
force-pushed the
AnshulMalik:xhr
branch
from
0ae82b4
to
fc47779
Oct 19, 2018
This comment has been minimized.
This comment has been minimized.
1-3 are present in this commit.
|
darkwing
merged commit 9fe51cc
into
firefox-devtools:master
Oct 20, 2018
This comment has been minimized.
This comment has been minimized.
mcroud
commented
Oct 22, 2018
Here are the final mockups for light and dark mode complete with the agreed "pause" terminology. Light mode: Dark mode: |
AnshulMalik commentedSep 5, 2018
Fixes Issue: #5255
Summary of Changes
Screenshots/Videos (OPTIONAL)