Closed Bug 679463 Opened 13 years ago Closed 4 years ago

[meta] Scratchpad object inspector (PropertyPanel) lacking some basic functionality

Categories

(DevTools :: General, enhancement)

6 Branch
x86
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allen, Unassigned)

References

Details

(Keywords: meta)

The scratch pad inspector is pretty limited. It really should be able to: 1) open a new inspector on the value of a property 2) allow user to set the title on an inspector so they can keep track of the objects 3) show the attribute values of properties 4) see the source code of methods & getters/setters 4) force evaluation of setters 3) delete properties (if they are configurable) 4) add additional properties
Also, a scratchpad menu item to close all inspectors associated with the current scratch pad would be very useful for cleaning up after opening a bunch of inspectors.
Great suggestions Allen. Thanks for filing this. I expect we'll open separate bugs for each of these and link back here making this a meta bug.
Summary: Scratchpad inspector lacking some basic functionality → [meta] Scratchpad object inspector lacking some basic functionality
Depends on: 640223
Depends on: 679744
Depends on: 679749
What do you mean by: 3) show the attribute values of properties ? JS Object Properties, like enumerable, writeable, configurable etc? Or something else? Not sure how valuable those would be for most users, though it might help to explain why certain properties don't do what they're expecting.
Depends on: 679763
4) force evaluation of setters setters or getters? both?
Depends on: 679765
Summary: [meta] Scratchpad object inspector lacking some basic functionality → [meta] Scratchpad object inspector (PropertyPanel) lacking some basic functionality
(In reply to Rob Campbell [:rc] (robcee) from comment #3) > What do you mean by: > > 3) show the attribute values of properties ? The attributes that are returned by Object.getOwnPropertyDescript. Specifically enumerable, configurable, writable > > JS Object Properties, like enumerable, writeable, configurable etc? Or > something else? Not sure how valuable those would be for most users, though > it might help to explain why certain properties don't do what they're > expecting. These are now a first class part of the JS language that people can and do set as part of defining objects. When you are trying to understand why your program isn't doing what you expected you need to be able to see the values of these attributes.
(In reply to Rob Campbell [:rc] (robcee) from comment #4) > 4) force evaluation of setters > > setters or getters? both? I was specifically thinking about invoking the getter as if a [[Get]] was performed for that property. An inspector UI for setting the value of any property seems like another distinct feature. If that feature is there, then it should probably call the setter when applied to an accessor properties. Another distinct feature would be modification of property attributes, including the getter and setter functions of an accessor or changing an accessor property to/from a data property. If a scratchpad for can be openned on an inspector it may less important to support this because Object.defineProperty(this,...) could be evaluated in the scratch pad to modify property definitions.
(In reply to Allen Wirfs-Brock from comment #5) > (In reply to Rob Campbell [:rc] (robcee) from comment #3) > > What do you mean by: > > > > 3) show the attribute values of properties ? > > The attributes that are returned by Object.getOwnPropertyDescript. > Specifically > enumerable, configurable, writable ok, that's what I thought. I just wanted to make sure. (need to file a separate bug for this) (In reply to Allen Wirfs-Brock from comment #6) > (In reply to Rob Campbell [:rc] (robcee) from comment #4) > > 4) force evaluation of setters > > > > setters or getters? both? > > I was specifically thinking about invoking the getter as if a [[Get]] was > performed for that property. [...] > If a scratchpad for can be openned on an inspector it may less important to > support this because Object.defineProperty(this,...) could be evaluated in > the scratch pad to modify property definitions. Yeah, that's kind of what I was thinking wrt to the "mini-scratchpad" embedded in inspectors. You kind of gain some superpowers with arbitrary runnable code attached to the inspected object. It makes sense to add that before some of these features to see what additional features we *really* need.
Bug 808370 landed and now the web console uses the variables view. We now allow users to edit property names and values and they can delete properties. Adding new properties is not yet possible - this is tracked by bug 808371. Force eval for getters in variables view will be added in bug 820878. Scratchpad is also switching to variables view, see bug 808369. Anything else left to tackle? Should we continue to keep this bug open?
The Scratchpad VariablesView currently is lacking implementation of the handlers for getter/setter editing and property deleting. The other issues were resolved by switching to the VariablesView in bug 808369.
Product: Firefox → DevTools

Not relevant any more, closing.

Honza

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.