Closed Bug 586149 Opened 14 years ago Closed 14 years ago

Some strings in the XBL Bindings viewer are hard to read

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: crussell, Assigned: crussell)

References

Details

Attachments

(3 files, 1 obsolete file)

Menulist and menuitem labels are often too long. It wouldn't be so bad, but the interesting bits are what gets cropped.

The rules for monospace text in the source views disappeared from the final patch from bug 530643.
There's also an unrelated change to deal with this warning:

Warning: assignment to undeclared variable kids
Source File: chrome://controlinspector/content/viewers/xblBindings/xblBindings.js
Line: 347
Assignee: nobody → Sevenspade
Status: NEW → ASSIGNED
Attachment #464671 - Flags: review?(neil)
Comment on attachment 464671 [details] [diff] [review]
Center cropping and tooltips for menulist and menuitems. Monospaced font on source view.

>+    <tooltip id="ttBindings"/>
Assuming it works, I'd prefer
<tooltip id="ttBindings">
  <observes element="mlBindings" attribute="label"/>
</tooltip>

Or add some code to displayBinding to update the menulist tooltiptext?
(In reply to comment #1)
> Monospaced font on source view.
I don't actually like this. Maybe I'm used to Arial, but I also notice that the fixed font also takes up much more space and therefore you can see less code at one time and the code you do see is more likely to get line-wrapped.
(In reply to comment #2)
> >+    <tooltip id="ttBindings"/>
> Assuming it works, I'd prefer
> <tooltip id="ttBindings">
>   <observes element="mlBindings" attribute="label"/>
> </tooltip>

I prefer the declarative approach, but the observes being a child of the tooltip messes up the tooltip's binding or something. It doesn't get its anonymous label child then.

> Or add some code to displayBinding to update the menulist tooltiptext?

This is what I did first, but it didn't work. It is now. Here we go then.

(In reply to comment #1)
> Created attachment 464671 [details] [diff] [review]
> Center cropping and tooltips for menulist and menuitems. Monospaced font on
> source view.
> 
> There's also an unrelated change to deal with this warning:
> 
> Warning: assignment to undeclared variable kids
> Source File:
> chrome://controlinspector/content/viewers/xblBindings/xblBindings.js
> Line: 347

Hey, look, this patch even includes this change this time!
Attachment #464671 - Attachment is obsolete: true
Attachment #465209 - Flags: review?(neil)
Attachment #464671 - Flags: review?(neil)
(In reply to comment #4)
> (In reply to comment #2)
> > >+    <tooltip id="ttBindings"/>
> > Assuming it works, I'd prefer
> > <tooltip id="ttBindings">
> >   <observes element="mlBindings" attribute="label"/>
> > </tooltip>
> I prefer the declarative approach, but the observes being a child of the
> tooltip messes up the tooltip's binding or something. It doesn't get its
> anonymous label child then.
How unfortunate. I notice that <button> and <toolbarbutton> has special XBL to stop that from happening. Maybe <tooltip observes="mlBindings"> would work?
Comment on attachment 465209 [details] [diff] [review]
Center cropping and tooltips for menulist and menuitems; no monospace for source view.

>       var url = urls.queryElementAt(i, Components.interfaces.nsIURI).spec;
>-      menulist.appendItem(url, url);
>+      var currentItem = this.mBindingsList.appendItem(url, url);
>+      currentItem.crop = "center";
>+      currentItem.tooltipText = currentItem.value;
Seems to make more sense to use = url again here.
Attachment #465209 - Flags: review?(neil) → review+
Pushed with that change:
http://hg.mozilla.org/dom-inspector/rev/eef568e4ee05
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I forgot to take this out when I switched to setting tooltipText.
Attachment #466529 - Flags: review?(neil)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 466529 [details] [diff] [review]
remove unused tooltip element [Check-in comment 10]

And I didn't notice either :-(
Attachment #466529 - Flags: review?(neil) → review+
Pushed:
http://hg.mozilla.org/dom-inspector/rev/05baced273f8
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Attachment #466529 - Attachment description: remove unused tooltip element → remove unused tooltip element [Check-in comment 10]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: