Closed Bug 1501959 Opened 6 years ago Closed 6 months ago

[markup-view] "Add attribute" input should have a 1 character left margin

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: fvsch, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

When using "Attributes > Add attribute" on a node in the Markup view, I'm always puzzled that I get a result looking like this (where | is the cursor): <element| > or, if there are existing attributes: <element foo="bar" data-test-id="xyz"| > Building on my knowledge of HTML, I know that if I write code like <elementmyattribute=""> or <element id="x"myattribute=""> it can break strangely (the second one seems to be fine in the HTML5 parsing algorithm era; maybe this just shows my age). So I always type `<space>myattribute="..."` in that input. Only today have I realized that it's not necessary. :P I think adding a small space such as `margin-left: 1ch` to the text input would make things clearer. Looking at what Chrome does: there's roughly one space between the input and the previous element name or attribute, but the input also has negative margins that eat into half of that space. The same style is used when editing element names and existing attributes.
See Also: → 1502003
Summary: "Add attribute" input should have a 1 character left margin → [markup-view] "Add attribute" input should have a 1 character left margin
Severity: normal → enhancement
Priority: -- → P3
Severity: normal → S3

To be able to target the specific inplace editor input,
we add a new inputClass option to InplaceEditor that can
be used to add an additional class to the input.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f021d9a82187 [devtools] Add inline start margin on new attribute input. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Regressions: 1925913
No longer regressions: 1925913
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: