Closed
Bug 1296490
Opened 9 years ago
Closed 9 years ago
Fix the checked status of toggle button on GCLI toolbox when opened after the developer tools
Categories
(DevTools Graveyard :: Graphic Commandline and Toolbar, defect, P2)
DevTools Graveyard
Graphic Commandline and Toolbar
Tracking
(firefox48 wontfix, firefox49 wontfix, firefox50 wontfix, firefox51 wontfix, firefox52 fixed)
RESOLVED
FIXED
Firefox 52
People
(Reporter: magicp.jp, Assigned: chirag.student, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
Attachments
(2 files, 3 obsolete files)
|
19.64 KB,
image/png
|
Details | |
|
1.47 KB,
patch
|
miker
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20160818030226
Steps to reproduce:
1. Start Nightly
2. Go to any sites (e.g. about:home)
3. Open the Developer Tools > Web Console (Crtl+Shift+K)
4. Open GCLI toolbox (Shift+F2)
5. Clear the web console output if toolbox toggle button (developer-toolbar-toolbox-button) displays error count
6. Check the color (checked status) of toolbox toggle button
Actual results:
The checked status of developer-toolbar-toolbox-button is not "true". However, after repeat toggle or if replace the step 3 and 4, it works well.
Regression range:
https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=3eb3406f08b594fe2b54926c6649eb8c5347104d&tochange=21be9fc9356d9ee4f396a5263b0aa1b47266eb8a
Expected results:
The checked status of developer-toolbar-toolbox-button should be reflected correctly.
Blocks: 1259024
Has Regression Range: --- → yes
Has STR: --- → yes
status-firefox48:
--- → affected
status-firefox49:
--- → affected
status-firefox50:
--- → affected
status-firefox51:
--- → affected
Component: Untriaged → Developer Tools: Graphic Commandline and Toolbar
OS: Unspecified → All
Hardware: Unspecified → All
Hi @Michael
I want to work on this bug, kindly assign me this please
I am ready to work and contribute
Flags: needinfo?(mratcliffe)
(In reply to Chirag from comment #1)
> Hi @Michael
> I want to work on this bug, kindly assign me this please
> I am ready to work and contribute
Thats great, let me know on irc if you need any help.
Assignee: nobody → chirag.student
Flags: needinfo?(mratcliffe)
Chirag: Do you need any help?
Flags: needinfo?(chirag.student)
Thanks Michael,
Yeah i need help ,this is my first bug ,
I totally understand the bug i have to resolve . i want to know more technically .
toolbarbutton is a XUL element so the checked attribute is set automatically. What you need to do is check whether the toolbox is open when the wrench is first displayed and set the "checked" attribute to true or false depending on whether the toolbox is visible or not.
Maybe it helps if I go over how I would approach this bug:
1. Follow steps 1-6 from comment 0 to reproduce the bug.
2. Ensure that "Enable browser chrome and add-on debugging toolboxes" is checked in the toolbox preferences.
3. "Tools" -> "Web Developer" -> "Browser Toolbox"
4. In the browser toolbox click the "Inspector" tab.
5. Click the inspect button and highlight the wrench.
6. A toolbarbutton element is selected in the markup panel.
7. To the right of this element there is a tiny "ev" button.
8. Click the "ev" button.
9. Click the filename that appears in the popup to see the code that the onCommand event calls.
10. Copy "gDevToolsBrowser.toggleToolboxCommand(window.gBrowser)" and search for it in your editor.
11. Go to the result inside developer-toolbar.js. This is the code that toggles the toolbox.
Look at the code in that section and you can see that this is where toolboxBtn is constructed so it is the perfect place to add the "checked" attribute.
Maybe there is something inside gDevToolsBrowser that will let you know if the toolbox has been opened. If there is you could use that to set the "checked" attribute to the appropriate value.
Flags: needinfo?(chirag.student)
I found the events listening to open and closing of Toolbox ,
these events ARE gDevTools.on("toolbox-ready", this._onToolboxReady);
gDevTools.on("toolbox-destroyed", this._onToolboxDestroyed);
but i am not able to get any function to check at any instant that whether Toolbox is opened or not .
I suspect these functions may help - > getToolbox(target) or toolbox.currentToolId
But i am not able to get how these are exactly used and what is the target here . Plz help
Flags: needinfo?(mratcliffe)
Please enter the following in the appropriate place inside DeveloperToolbar.prototype.createToolbar():
let toolboxOpen = gDevToolsBrowser.hasToolboxOpened(this._chromeWindow);
toolboxBtn.checked = toolboxOpen;
Then please attach your patch to this bug.
Flags: needinfo?(mratcliffe)
Yes i am done with this, but now one more issue is there -> if i test this with different tabs opened, and different instances of Toolbox is opened, then when i toggle GCLI toolbar button it doesn't work for each toolbox instance at every tab ,because there's only 1 gcli toolbar in the whole browser
well, clicking on the button should still open/close the toolbox in the current tab ,
and the status of the button should correspond to the status of the toolbox in the current tab . this is another bug... but i can do this bcz its very related to what i am fixing
i found handleEvent in developer-toolbar.js which treats TabSelect events ,can i use this anyway to listen for tabSelect events and change the color (checked status) of toolbox toggle button
Flags: needinfo?(mratcliffe)
(In reply to Chirag from comment #9)
> i found handleEvent in developer-toolbar.js which treats TabSelect events
> ,can i use this anyway to listen for tabSelect events and change the color
> (checked status) of toolbox toggle button
Yes, you can... the code in there should be almost the same.
Flags: needinfo?(mratcliffe)
| Assignee | ||
Comment 11•9 years ago
|
||
| Assignee | ||
Comment 12•9 years ago
|
||
Fix the checked status of toggle button on GCLI toolbox
Attachment #8794093 -
Flags: review?(mratcliffe)
| Assignee | ||
Comment 13•9 years ago
|
||
something fishy is happening in patching my commit ,plz tell :miker where i am doing wrong.
i am using git moz-tools ,
I run this command - git bz attach -e HEAD
| Assignee | ||
Comment 14•9 years ago
|
||
something fishy is happening in patching my commit ,plz tell :miker where i am doing wrong.
i am using git moz-tools ,
I run this command - git bz attach -e HEAD
Flags: needinfo?(mratcliffe)
| Assignee | ||
Comment 15•9 years ago
|
||
Fix the checked status of toggle button on GCLI toolbox
Attachment #8793759 -
Attachment is obsolete: true
Attachment #8794093 -
Attachment is obsolete: true
Attachment #8794093 -
Flags: review?(mratcliffe)
| Assignee | ||
Comment 16•9 years ago
|
||
Fix the checked status of toggle button on GCLI toolbox when opened after the developer tools
Also when user changes tab, then toogle button works correctly now -> fixed .
Attachment #8794119 -
Attachment is obsolete: true
Flags: needinfo?(mratcliffe)
Attachment #8794187 -
Flags: review?(mratcliffe)
Attachment #8794187 -
Flags: review?(mratcliffe) → review+
Thanks for your patch, r+.
Now you just need to add the checkin-needed keyword and the code will be landed for you.
Keywords: checkin-needed
| Assignee | ||
Comment 18•9 years ago
|
||
Thanks for reviewing and mentoring :) .I've added the keyword checkin-needed .Now what will happen
Flags: needinfo?(mratcliffe)
Now somebody responsible for doing so will find the bug and land your patch.
Flags: needinfo?(mratcliffe)
Comment 20•9 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/df40bb716fe8
Fix the checked status of toggle button on GCLI toolbox r=miker
Keywords: checkin-needed
Comment 21•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Comment 22•9 years ago
|
||
I have reproduced this bug with Nightly 51.0a1 (2016-08-18) on Windows 7 , 64 Bit !
This bug's fix is verified with latest Nightly
Build ID : 20160928030201
User Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 23•9 years ago
|
||
Don't think we want to uplift that as it has been there for a while, we should probably let it ride the train.
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•7 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•