Closed
Bug 786803
Opened 14 years ago
Closed 14 years ago
GCLI help command panel is too big
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 18
People
(Reporter: msucan, Assigned: miker)
References
Details
Attachments
(2 files, 2 obsolete files)
|
178.79 KB,
image/png
|
Details | |
|
5.61 KB,
patch
|
Details | Diff | Splinter Review |
The GCLI help command output is too tall and too narrow.
Comment 1•14 years ago
|
||
Mike - is this fixed by our resize fix?
| Assignee | ||
Comment 2•14 years ago
|
||
I have never seen it look like that so I doubt it but it could be.
Comment 3•14 years ago
|
||
Mihai - do you know how you got it to look like that?
| Reporter | ||
Comment 4•14 years ago
|
||
Joe: I just open Firefox, enable dev toolbar and type "help". I use Ubuntu 12.04, all up-to-date.
| Assignee | ||
Comment 5•14 years ago
|
||
I was almost able to reproduce this by making the browser really narrow before typing help. Seems like it happens for Mihai without a narrow browser :o/
We could just set min-width in _resize() using Math.max(x, min_width). It would be good to know the cause - I suspect that _input is not very narrow as we try to match it's size.
This could possibly be fixed by the addon install command (bug 771066) where I switched from _input.clientWidth to _input.getBoundingClientRect().width.
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
| Assignee | ||
Comment 6•14 years ago
|
||
The patch for bug 785134 allows us to reliably reproduce this, at least on Linux.
| Assignee | ||
Comment 7•14 years ago
|
||
Fairly simple patch ... not yet tested on Windows or OSX.
Attachment #666987 -
Flags: review?(jwalker)
Comment 8•14 years ago
|
||
Comment on attachment 666987 [details] [diff] [review]
Patch
Review of attachment 666987 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with those fixes.
::: browser/devtools/shared/DeveloperToolbar.jsm
@@ +723,5 @@
> }
>
> + let width = Math.min(
> + this._panel.ownerDocument.documentElement.clientWidth,
> + this.document.documentElement.scrollWidth + 15
Magic numbers. I know I was bad here, but some people say you should never have magic numbers at all. I can see the downside, but I also get that sometimes the calculations to work out the magic number as just as fragile as the magic number itself.
Assuming 15 is hard to calculate, could you at least document what it represents?
@@ +731,5 @@
> + this._panel.ownerDocument.documentElement.clientHeight,
> + this.document.documentElement.scrollHeight
> + );
> +
> + this._frame.style.minWidth = width + 2 + "px";
Insert magic number comment here too.
Also, nit, could you say: (width + 2) + "px";
Just to make it clear of the order that the addition should be done in.
Attachment #666987 -
Flags: review?(jwalker) → review+
| Assignee | ||
Comment 9•14 years ago
|
||
When making the requested changes I found the panel placement still to be unreliable.
This new patch addresses this issue basically by manually positioning and sizing panels.
Attachment #666987 -
Attachment is obsolete: true
Attachment #667555 -
Flags: review?(jwalker)
Comment 10•14 years ago
|
||
Comment on attachment 667555 [details] [diff] [review]
Reimplemented
Review of attachment 667555 [details] [diff] [review]:
-----------------------------------------------------------------
You don't have to fix this unless you strongly agree, or are editing the file for another reason.
On the other hand I would be interested to know if you agree that Object.defineProperty is a better solution here.
::: browser/devtools/shared/DeveloperToolbar.jsm
@@ +678,5 @@
> + * Determine the scrollbar width in the current document.
> + *
> + * @private
> + */
> +OutputPanel.prototype.__defineGetter__("scrollbarWidth", function() {
I think that
Object.defineProperty(OutputPanel.prototype, 'scrollbarWidth', {
get: function() {
...
},
enumerable: true
};
Is probably a more trendy way to spell __defineGetter__ these days?
Attachment #667555 -
Flags: review?(jwalker) → review+
| Assignee | ||
Comment 11•14 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #10)
> Comment on attachment 667555 [details] [diff] [review]
> Reimplemented
>
> Review of attachment 667555 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> You don't have to fix this unless you strongly agree, or are editing the
> file for another reason.
> On the other hand I would be interested to know if you agree that
> Object.defineProperty is a better solution here.
>
> ::: browser/devtools/shared/DeveloperToolbar.jsm
> @@ +678,5 @@
> > + * Determine the scrollbar width in the current document.
> > + *
> > + * @private
> > + */
> > +OutputPanel.prototype.__defineGetter__("scrollbarWidth", function() {
>
> I think that
>
> Object.defineProperty(OutputPanel.prototype, 'scrollbarWidth', {
> get: function() {
> ...
> },
> enumerable: true
> };
>
> Is probably a more trendy way to spell __defineGetter__ these days?
Yes, all of the cool kids are using it. Typing __defineGetter__ is an old habit that I do without thinking.
Anyhow, we shouldn't be using deprecated stuff so I have updated it.
Attachment #667555 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Whiteboard: [land-in-fx-team]
Updated•14 years ago
|
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 12•14 years ago
|
||
Comment 13•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 18
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•