Closed Bug 272906 Opened 15 years ago Closed Last year

JavaScript object panel needs more features


(Other Applications :: DOM Inspector, defect)

Windows 98
Not set


(Not tracked)



(Reporter: WeirdAl, Unassigned)





(2 files)

Spun off of bug 193942.  This bug is for a major redesign of the JavaScript
Object panel to support:

* Dynamic resorting by alphabetical listing or by original ordering
* Revealing unenumerated properties (like window.Components)
* Regular-expression searches of the tree for names or values matching a regexp
* A multiline textbox for those multiline values
* Typeof included
* Matching an inspected value against a higher inspected value (for instance,
document.defaultView.document == document)
* Assigning a match for convenience
* Creating new properties and methods on the fly
* Executing methods on the fly and getting a return value added to the tree
To aid caillon and others in reviewing, I'm going to do a compare-and-contrast
for the JSObject user-interface.

First, I'll create a XUL file that emulates what JSObject does now, but outside
of chrome.

Second, I'll create XUL files that emulate what I want JSObject to do, and link
to  the main XUL application.

If reviewers like the new UI, I'll create a patch for DOM Inspector.  This will
save needless multiple attachments to this bug.
The JSObject panel's context menu's commands (which are excluded from this
demo) have "Inspect in New Window," "Copy Value" and "Evaluate JavaScript." 
Each of these refers to the root item in the tree, not to whatever the tree's
current selection is.
Attached file Proposed new UI
Missing: Inspect in new window, Copy value.

This is stable enough, though, for people to offer feedback and reviews on the
UI.  Porting to DOM Inspector should be really, really easy.
Bug in demo:
Steps to reproduce:
(1) Open target item in tree.
(2) Right-click on ATTRIBUTE_NODE tree item and select "Assign match..."
(3) In new user-interface below tree, enter "", minus quotes.
(4) Click OK button.

Expected results:
Match column for ATTRIBUTE_NODE fills with "", minus quotes.

Actual results:
Match column for ATTRIBUTE_NODE fills with "", minus quotes.
New child item of ATTRIBUTE_NODE, named "bar" in leftmost column, appears.

Will fix before posting patch.  Please also note any other bugs with the
implementation you see in the attachment, so I can fix them as well.
When selecting "Set property" from the context menu, could the currently
selected property be filled into the resulting property name field?

Hmm, maybe not. I see now "Set property" is actually creating a new sub-property
to the currently selected one. Maybe "Create property" would be better?

UI commentary:
* I wasn't sure what the "property name" input field was for. I think that it's
only for filtering the properties display, but I'm still not sure. I think that
the two "RegExp" buttons ought to be labelled "filter" somehow, and might should
be a dropdown menu instead.

* The root node should be expanded at startup.

* The "match" column was a little mysterious to me, and even after it was
explained it seems much less useful to me. Perhaps it should be the fourth
column instead of second?

* There should be a splitter between the property pane and the data pane, to
allow resizing.
Comment on attachment 169348 [details]
Proposed new UI

Comments on the UI:

- the textbox and its interaction with the buttons is a bit nonobvious to me...
I would suggest, for a start, to group the three buttons on a single line under
the textbox. 

- the "Match" column seems not very useful to me, and "Assign Match" seems
somewhat strange... I would maybe do this:
remove "assign match", and make "set property" prefill value with the thing you
rightclicked on

(that way, Set Property does have some context-sensitive feature, which is good
given it's a context menu item)

- having OK/Cancel as buttons that are always there but usually greyed out is
confusing to me, maybe they should only be there while the rest of the ui that
they apply to appears

- it was a bit nonobvious to me how I could reset the view to show all nodes

- I think this would be a good deal more intuitive if the textbox worked like
about:config's filter. filtering by value, or the first button's functionality,
would require some more thought then, though...
Reassigning DOM-I bugs which have stagnated in my buglist back to default owner.  Hopefully someone will pick up some of these bugs and work on them.  I'll continue to follow them.
Assignee: ajvincent → dom-inspector
Version: unspecified → Trunk
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
Bulk close. This component is no longer supported or maintained.
Closed: Last year
Resolution: --- → INCOMPLETE
Bulk close. This component is no longer supported or maintained.
You need to log in before you can comment on or make changes to this bug.