Closed
Bug 729220
Opened 13 years ago
Closed 13 years ago
Allow editing of attribute names in the HTML panel of the Page Inspector
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 13
People
(Reporter: rcampbell, Assigned: rcampbell)
References
Details
Attachments
(2 files, 1 obsolete file)
16.94 KB,
patch
|
paul
:
review+
|
Details | Diff | Splinter Review |
17.25 KB,
patch
|
Details | Diff | Splinter Review |
We currently only have editing of attribute values in the page inspector. We should allow editing of attribute names as well.
Assignee | ||
Updated•13 years ago
|
Assignee | ||
Comment 1•13 years ago
|
||
It's not pretty, but it's based on some pretty ugly editor code to begin with. I think this has potential to be cleaned up and made less awful.
Editing text nodes should be straight-forward as well, but I will probably do that and tabbing in followups.
Attachment #599280 -
Flags: feedback?(paul)
Assignee | ||
Updated•13 years ago
|
Attachment #599280 -
Flags: feedback?(dcamp)
Assignee | ||
Comment 2•13 years ago
|
||
asking dcamp for addl feedback.
hoping to get back to this patch this week.
Comment 3•13 years ago
|
||
(working on that today)
Assignee | ||
Comment 4•13 years ago
|
||
(ok, but be careful. it's ugly.)
Comment 5•13 years ago
|
||
Comment on attachment 599280 [details] [diff] [review]
an egregious hack wip
Review of attachment 599280 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/highlighter/TreePanel.jsm
@@ +340,5 @@
> + if (this.hasClass(target, "nodeName")) {
> + let attrName = target.innerHTML;
> + let attrValNode = target.nextSibling.nextSibling; // skip 2 (=)
> +
> + if (attrValNode)
When is this going to be false? What is it protecting against?
Attachment #599280 -
Flags: feedback?(dcamp) → feedback+
Comment 6•13 years ago
|
||
Comment on attachment 599280 [details] [diff] [review]
an egregious hack wip
f+. The infobar is not updated though (even if we change a value, so it's a more general problem).
Attachment #599280 -
Flags: feedback?(paul) → feedback+
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to Dave Camp (:dcamp) from comment #5)
> Comment on attachment 599280 [details] [diff] [review]
> an egregious hack wip
>
> Review of attachment 599280 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: browser/devtools/highlighter/TreePanel.jsm
> @@ +340,5 @@
> > + if (this.hasClass(target, "nodeName")) {
> When is this going to be false? What is it protecting against?
there are a bunch of different classes in the html panel's DOM nodes.
nodeName is specific to the attribute name. nodeValue is for the attributeValue, editGroup for the parent "group" node, etc. It'll be false for any of these as well as text nodes, twisties, ...
nodeName is what makes the attribute's name node a thing and this recognizes that you've clicked one.
Thanks for the feedback, guys. I'll polish this up and get it tested.
Assignee | ||
Comment 8•13 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #6)
> Comment on attachment 599280 [details] [diff] [review]
> an egregious hack wip
>
> f+. The infobar is not updated though (even if we change a value, so it's a
> more general problem).
I could do the same as I do for the deleteNode code from the context menu. Invalidate the breadcrumbs on editor save? We'd also want to update the infobar if id or classes change.
Assignee | ||
Comment 9•13 years ago
|
||
finished patch. Didn't make any changes to the tree panel code for this round. It's adequate. May refactor on a subsequent patch.
includes a test.
Attachment #599280 -
Attachment is obsolete: true
Attachment #604158 -
Flags: review?(paul)
Comment 10•13 years ago
|
||
Comment on attachment 604158 [details] [diff] [review]
html attribute name editing
Review of attachment 604158 [details] [diff] [review]:
-----------------------------------------------------------------
r+ , Please update the comment of the onTreeDblClick method to reflect its new behavior ("attribute value" -> "attribute name or value").
Attachment #604158 -
Flags: review?(paul) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #604497 -
Flags: review+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [land-in-fx-team]
Comment 12•13 years ago
|
||
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 13•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 13
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•