Show the number of errors in the toolbox
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: bgrins, Assigned: nchevobbe)
References
Details
(Whiteboard: devtools-backward-compat)
Attachments
(3 files, 1 obsolete file)
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment 5•10 years ago
|
||
Comment 6•8 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
Hi Nicolas,
I would like to take up this issue. Could you assign this to me?
Thanks
Hemakshi
Assignee | ||
Comment 8•6 years ago
|
||
Hey Hemakshi, it's yours :)
Comment 9•6 years ago
|
||
(In reply to Nicolas Chevobbe from comment #8)
Hey Hemakshi, it's yours :)
Thanks a lot!
Can you please tell which options (as mentioned in comment #1) should I go with? :)
I guess option 3 has max votes.
Assignee | ||
Comment 10•6 years ago
|
||
Yeah, I think we can try 3. Victoria what's your opinion on this?
Comment 11•6 years ago
|
||
I'd suggest making it more compact by just showing the number with red coloring. I gave the solid red badge a try but it looked way too intense. What about just red text/slightly smaller font/some text separator like a colon?
Comment 12•6 years ago
|
||
Brighter red may look nicer, and not need a separator
Comment 13•6 years ago
|
||
Display the number of errors in the toolbox. Count resets to zero on Clear Console Output click and also on reload.
Updated•6 years ago
|
Comment 14•6 years ago
|
||
I pulled the UX discussion into a UX issue to discuss further and file follow up bugs: https://github.com/firefox-devtools/ux/issues/58 . This shouldn't block the work done here.
Comment 15•6 years ago
|
||
Finalish UX design is here: https://github.com/firefox-devtools/ux/issues/58#issuecomment-487788863
- Right-aligned in the toolbar.
- Click opens the split console or, when it is already open, focuses it.
:hemakshis, happy to discuss if you have questions or concerns on the UX. Thank you again for helping with this!
Comment 16•6 years ago
|
||
:hemakshis, I left some comments in Phab
Couple more notes:
-
Cached messages are not supported yet. I.e. when I generate a few errors before the Toolbox is opened they are not counted when the Toolbox opens.
-
The UX design decision is to display the number on the right side (not within Console panel tab). So, the rendering should move from
ToolboxTab
toToolboxTabs
component (we can render either in "toolbox-tabs-wrapper" or "toolbox-tabs" element) -
There should be an icon rendered before the number (see the mockup on github)
-
If the user clicks the icon or number, split console should open. See this code showing how to open it:
https://searchfox.org/mozilla-central/rev/f0ef51bfafc8ad0c3a2f523bf076edc57dc4891a/devtools/client/netmonitor/src/app.js#42
Thanks!
Honza
Comment 17•6 years ago
|
||
(In reply to :Harald Kirschner :digitarald from comment #15)
Finalish UX design is here: https://github.com/firefox-devtools/ux/issues/58#issuecomment-487788863
- Right-aligned in the toolbar.
- Click opens the split console or, when it is already open, focuses it.
:hemakshis, happy to discuss if you have questions or concerns on the UX. Thank you again for helping with this!
Hi :digitarald,
I like the UX design especially the idea of having an icon as it gives more meaning to the number shown beside it because the badge option on the right side felt a little confusing as what the numbers could mean to the user (especially if Console is not the active tab).
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #16)
:hemakshis, I left some comments in Phab
Couple more notes:
- Cached messages are not supported yet. I.e. when I generate a few errors before the Toolbox is opened they are not counted when the Toolbox opens.
For this, as suggested by :nchevobbe, we need to add server functions. I was thinking that the best way of doing this would be to call the getCachedErrorCount
function directly and as soon as the toolbox initializes as this will make the count visible even when the current active tab is not "Console" (i.e. is we open devtools with another tab other than Console) and also solve the issue of counts getting doubled when switching to Console tab (as pointed out by Nicolas).
I still have to find how we can call the function residing in the WebConsoleActor
from the toolbox.js
The UX design decision is to display the number on the right side (not within Console panel tab). So, the rendering should move from
ToolboxTab
toToolboxTabs
component (we can render either in "toolbox-tabs-wrapper" or "toolbox-tabs" element)There should be an icon rendered before the number (see the mockup on github)
If the user clicks the icon or number, split console should open. See this code showing how to open it:
https://searchfox.org/mozilla-central/rev/f0ef51bfafc8ad0c3a2f523bf076edc57dc4891a/devtools/client/netmonitor/src/app.js#42Thanks!
Honza
Thanks, :Honza for the pointers! I'll update the patch as soon as possible.
Comment 18•6 years ago
•
|
||
Here's the minified SVG for the 10px icon discussed on GitHub:
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10">
<path fill="context-fill" fill-rule="evenodd" d="M5 10A5 5 0 1 0 5 0a5 5 0 0 0 0 10zm-.73-1.86a1.03 1.03 0 1 0 1.46-1.46 1.03 1.03 0 0 0-1.46 1.46zm-.3-3.16c0 .4.46.7 1.03.7.57 0 1.03-.3 1.03-.7v-2.7c0-.4-.46-.71-1.03-.71-.57 0-1.03.31-1.03.7v2.71z"/>
</svg>
Source: Victoria's work with a pixel-fitting tweak, see bottom right icon on:
https://www.figma.com/file/QyMFowXyaMgh5GxZMXc7mL6J/Error-Count-icon
Updated•6 years ago
|
Comment 19•6 years ago
|
||
Hi Hemakshi, thanks so much for the work done so far. Just wondering, do you still intend to continue working on this bug? Just let us know if you need any help. If you do not plan on working on it anymore, let us know too so it can be made available to others.
Updated•6 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 22•4 years ago
|
||
Let's try to move this over the finish line!
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 23•4 years ago
|
||
This patch displays an error icon matching the number
of errors handled in the console.
An error can be:
- a nsIScriptError that is not a warning
- a console.error call
- a console.assert call
- a 4xx or 5xx network call
The counter is handled via the resourceWatcher of the toolbox,
where we listen for the different resources we need.
Clearing the console from the UI or via console.clear resets
the error count.
Clicking on the icon opens the split console if it wasn't already.
Navigating clears the error count, except if the persist log
option is enabled in the console.
A test is added to ensure this works as expected.
Comment 24•4 years ago
|
||
Comment 25•4 years ago
|
||
bugherder |
Updated•3 years ago
|
Updated•3 years ago
|
Description
•