Closed
Bug 1420112
Opened 7 years ago
Closed 6 years ago
Unify "jump to debugger" icons
Categories
(DevTools :: Inspector, enhancement, P3)
DevTools
Inspector
Tracking
(firefox59 wontfix, firefox60 fixed)
RESOLVED
FIXED
Firefox 60
People
(Reporter: nchevobbe, Assigned: pradeepgangwar)
Details
(Keywords: good-first-bug)
Attachments
(3 files, 1 obsolete file)
In https://github.com/devtools-html/devtools-core/pull/812, we added an icon to jump to the definition of a logged function. In the event bubble, we also have an icon to jump to the debugger (a breakpoint-like icon). We should use the same icon in the console and in the event bubble. Furthermore, I'd say that the one we have in the event bubble at the moment can confuse user and make them think they'll add a breakpoint at the said location. A "navigate-to" icon would be better (could be another one that the one added in Reps of course).
Reporter | ||
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
I think we can even change how the files are shown in the bubble to :
> ▶︎ filename + location ↱
Clicking on the `▶︎` (and the filename) icon would expand/toggle the preview
Clicking `↱` would open the debugger.
Reporter | ||
Comment 3•7 years ago
|
||
What do you think Victoria ?
Severity: normal → enhancement
Flags: needinfo?(victoria)
Priority: -- → P3
Comment 4•7 years ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #0) > > Furthermore, I'd say that the one we have in the event bubble at the moment > can confuse user and make them think they'll add a breakpoint at the said > location. A "navigate-to" icon would be better (could be another one that > the one added in Reps of course). +1 On top of thinking that it would add a breakpoint, I had several chats with users who thought this was just for decoration and would never think about clicking on it. Also think your proposal to change the position of the icon is good. Having it after the location seems more natural for an action that should "jump" to a location.
Comment 5•7 years ago
|
||
Wow, yeah, Nicolas' idea seems like a huge improvement! Both the breakpoint icon AND the disclosure by clicking "bubbling/DOM" are so confusing. Sounds great to have the ↱ at the end of the rows.
Flags: needinfo?(victoria)
Reporter | ||
Comment 6•7 years ago
|
||
Also, I see that we are labelling those events (jquery, react), it would be really nice if we could have access to all the library icons from the debugger and put it here instead of a dull text.
Reporter | ||
Comment 7•7 years ago
|
||
Quick hacking on this
Reporter | ||
Comment 8•7 years ago
|
||
if someone is willing to take this bug, i'm putting my WIP patch in mozreview so it can be applied easily.
Comment hidden (mozreview-request) |
Reporter | ||
Updated•7 years ago
|
Keywords: good-first-bug
Comment 10•7 years ago
|
||
Yes, framework icons would be great! With this new design, does it still make sense for the bubbling/capturing/dom badges to be on the right of this popup? I'm wondering if they should be moved between the function name and source path, so that the jump-to-debugger icons could be right-most (and aligned to right).
Reporter | ||
Comment 11•7 years ago
|
||
(In reply to Victoria Wang [:victoria] from comment #10) > Yes, framework icons would be great! > > With this new design, does it still make sense for the > bubbling/capturing/dom badges to be on the right of this popup? I'm > wondering if they should be moved between the function name and source path, > so that the jump-to-debugger icons could be right-most (and aligned to > right). I think it would make sense to do what you suggest, since it will be : event name | event informations | source | jump to source the only drawback is that the infomations (bubble, jquery, bubble) can be quite "bold". Having framework icon would tame that, but maybe we can go further an think of a cleaner wait to show those information ?
Comment 12•7 years ago
|
||
Yeah, it feels like those info badges might be more bold than they need to be. I'm also wondering about moving them to the left of event name so that there's more of a... sort of code-like hierarchy, where class names go before functions? Although bubbling/capturing don't represent a library/class name, so maybe those need to go elsewhere? (this may be a totally misguided idea, but just in case): ▶︎ (React icon) React: event_name ...path ↱ ...with the event name colored blue or something to make it stand out more. I feel like the source path could use some cleanup as it's a bit overwhelming-looking. Some simple things like remove the ?(hash) from after filename, truncate sooner to add some whitespace, adding syntax highlighting to the line number, etc, would help.
Comment 13•7 years ago
|
||
I might be getting too much into the weeds with the latest comments though - I definitely think that your current work that adds the disclosure/jump icons should be submitted as a patch, and these other ideas can be continue to be discussed for a later patch :)
Assignee | ||
Comment 14•7 years ago
|
||
I can try this bug. But i think for this i need to run inspector in browser mode like debugger.html. Please help me with that and i will try if i can help in this bug. :)
Flags: needinfo?(nchevobbe)
Reporter | ||
Comment 15•6 years ago
|
||
(In reply to Pradeep Gangwar [:pradeepgangwar] from comment #14) > I can try this bug. But i think for this i need to run inspector in browser > mode like debugger.html. Please help me with that and i will try if i can > help in this bug. :) We don't have this kind of thing for the inspector at the moment. You need to build and run firefox like `./mach build faster && ./mach run`
Flags: needinfo?(nchevobbe)
Assignee | ||
Comment 16•6 years ago
|
||
I applied the patch given, and it worked very well. I would like to ask what more changes are needed other than those applied in your patch.
Flags: needinfo?(nchevobbe)
Reporter | ||
Comment 17•6 years ago
|
||
(In reply to Pradeep Gangwar [:pradeepgangwar] from comment #16) > I applied the patch given, and it worked very well. I would like to ask what > more changes are needed other than those applied in your patch. This should be modified to work in dark mode too, which it does not right now. Also, you should run the tests to make sure we did not break one. And finally, since we added something on the header to have a collapsed/expanded test, we should add a test for that as well.
Flags: needinfo?(nchevobbe)
Reporter | ||
Comment 18•6 years ago
|
||
Hello Pradeep, Are you still working on this ? No pressure, I'm asking just to know if I can direct people here if they are willing to work on this bug.
Flags: needinfo?(pradeepgangwar39)
Assignee | ||
Comment 19•6 years ago
|
||
Actually i tried it a few weeks ago and i think to make "jump to debugger" icon work in dark mode i need to modify svg code written for it. But i had no idea of working with svg, hence i got stuck so after some attempts. I need guidance on that part.
Flags: needinfo?(pradeepgangwar39) → needinfo?(nchevobbe)
Comment hidden (mozreview-request) |
Reporter | ||
Comment 21•6 years ago
|
||
Hello Pradeep, I updated my WIP patch to work in dark mode too: https://reviewboard.mozilla.org/r/203860/diff/1-2/ Here are the important bits : - In the SVG (which I simplified), there is this attribute `stroke="context-stroke"`. This says that the color is not defined directly in the svg - Then, I put the following CSS for the image : ```css .event-tooltip-debugger-icon { -moz-context-properties: stroke; stroke: currentColor; } ``` -moz-context-properties allow us to control the stroke property from the CSS (See https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties). Setting stroke to `currentColor` will then make the icon the same color as the text (defined in the "younger" ancestor. So here the icon color will adapt to dark mode. So what's left for this bug to land is to make sure the tests are fine, and if not, fix them. Also we should add a test for the expanded/collapsed state. Do you have enough information to resume your work ? Don't hesitate to tell me if it's not the case so we can help you move forward on this :)
Assignee: nobody → pradeepgangwar39
Flags: needinfo?(nchevobbe)
Assignee | ||
Comment 22•6 years ago
|
||
Thanks! I will learn writing test and update here if i need some help. :)
Reporter | ||
Comment 23•6 years ago
|
||
So you can run the following command : ./mach test devtools/client/inspector/markup/test/browser_markup_events_01.js devtools/client/inspector/markup/test/browser_markup_events_02.js devtools/client/inspector/markup/test/browser_markup_events_03.js devtools/client/inspector/markup/test/browser_markup_events_04.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1.js devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1_jsx.js devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1.js devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1_jsx.js devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0.js devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0_jsx.js --headless This run the tests (./mach test) which are testing the event bubble, in headless (--headless), mode, which mean it won't open a new firefox window (it does if you don't pass --headless). Those tests all rely on https://searchfox.org/mozilla-central/rev/88439dc6c5b02e167032374071cdc697a056efa1/devtools/client/inspector/markup/test/helper_events_test_runner.js#30-128 which is the place you might need to modifications in.
Reporter | ||
Comment 24•6 years ago
|
||
Hello Pradeep, I wanted to check if you're blocked by something on this ? If you did not have the time to look into the bug, no worries :)
Flags: needinfo?(pradeepgangwar39)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 26•6 years ago
|
||
I read that file carefully and understood it's working. At the end i came up with something, that might not be the correct approach. If it's not a correct approach, please guide me if i need to write a new function.
Flags: needinfo?(pradeepgangwar39)
Reporter | ||
Comment 27•6 years ago
|
||
mozreview-review |
Comment on attachment 8944200 [details] Bug 1420112 - Refresh event bubble design; . https://reviewboard.mozilla.org/r/214486/#review220148 Thanks a lot pradeep. I pushed the patch to TRY (our CI, which run all the tests to make sure everything is okay with this patch). I have a couple of comments, but nothing really big. With those changes and a green TRY, I'll r+ you. ::: commit-message-6bb6f:1 (Diff revision 1) > +Bug 1420112- Unify 'jump to debugger' icons; r=nchevobbe There should be a space after the bug number: Bug 1420112 - ... Also, I think the commit message should be more precise, something like: Bug 1420112 - Refresh event bubble design; r=nchevobbe. Change the order of the icons so it makes more sense. Use te same "jump to debugger" icon as in the console. Add expanded/collapsed icon on event listener definition. ::: devtools/client/inspector/markup/test/helper_events_test_runner.js:122 (Diff revision 1) > + is(header.classList.contains("content-expanded"), true, > + "We are in expanded state and icon changed"); we should also assert that the header does not contain the class before we click on it.
Reporter | ||
Updated•6 years ago
|
Attachment #8932809 -
Attachment is obsolete: true
Reporter | ||
Comment 28•6 years ago
|
||
mozreview-review |
Comment on attachment 8944200 [details] Bug 1420112 - Refresh event bubble design; . https://reviewboard.mozilla.org/r/214486/#review220238
Attachment #8944200 -
Flags: review?(nchevobbe) → review-
Comment hidden (mozreview-request) |
Reporter | ||
Comment 30•6 years ago
|
||
mozreview-review |
Comment on attachment 8944200 [details] Bug 1420112 - Refresh event bubble design; . https://reviewboard.mozilla.org/r/214486/#review221174 Only one comment left about the commit message, but once this is resolved, we can land this patch. ::: commit-message-6bb6f:1 (Diff revision 2) > +Bug 1420112- Unify 'jump to debugger' icons; r=nchevobbe > + > +MozReview-Commit-ID: 10q9QYTmeO7 > +*** those 3 lines should be deleted ::: devtools/client/inspector/markup/test/helper_events_test_runner.js:116 (Diff revision 2) > + is(header.classList.contains("content-expanded"), false, > + "We are not in expanded state"); nice !
Attachment #8944200 -
Flags: review?(nchevobbe) → review+
Comment hidden (mozreview-request) |
Comment 32•6 years ago
|
||
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da500b8a4368 Refresh event bubble design; r=nchevobbe.
Comment 33•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/da500b8a4368
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Updated•6 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•