Closed
Bug 1243695
Opened 9 years ago
Closed 9 years ago
Inspector ruleview inplace-editor takes more space than the text it replaces
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox47 fixed)
RESOLVED
FIXED
Firefox 47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
Details
Attachments
(3 files, 5 obsolete files)
This is a minor annoyance, but in the ruleview, editing a selector, a rulename or rulevalue will shift the elements next to the inserted input a few pixels to the right and to the bottom.
As you can see in the attachement when editing the "margin" rulename, the associated value shifts to the right (~10px), and the padding rule shifts 1 px to the bottom.
It would be much nicer if the input used the same space as the span it replaces.
Assignee | ||
Comment 1•9 years ago
|
||
Simple fix proposal, applying a negative margin on the inplace-editor input.
Removed the additional 10px added to the input's width.
Added a min width of 10px for empty elements.
Assignee | ||
Comment 2•9 years ago
|
||
How it looks like with the patch applied.
Assignee | ||
Comment 3•9 years ago
|
||
Mike : I think you initially added https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/inplace-editor.js#379 (extra 10 pixels to avoid scrolling when we type).
Do you remember the exact issue ? I can't seem to reproduce it, and removing the 10 extra px makes the input swapping smoother.
Flags: needinfo?(mratcliffe)
I never changed it... I just moved the file at one time and this line was already there.
If it works better without the padding then feel free to remove it.
Flags: needinfo?(mratcliffe)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•9 years ago
|
||
Thanks for the info!
Could you review the changeset?
try : https://treeherder.mozilla.org/#/jobs?repo=try&revision=6bbeea316a70
Attachment #8713125 -
Attachment is obsolete: true
Attachment #8714313 -
Flags: review?(mratcliffe)
Comment on attachment 8714313 [details] [diff] [review]
bug1243695.v1.patch
Review of attachment 8714313 [details] [diff] [review]:
-----------------------------------------------------------------
Can you look into the test failures before I review this?
Attachment #8714313 -
Flags: review?(mratcliffe)
Assignee | ||
Comment 8•9 years ago
|
||
Sure! Thanks for pinging me. Interestingly, I don't have the failure locally on OSX.
Looks like the test is clicking 1px too high, and the expected blur is not triggered anymore.
Just updated the test to click at "height / 2".
new try push : https://treeherder.mozilla.org/#/jobs?repo=try&revision=5232c0d163fd
I will flag for review again if try is ok.
You should use EventUtils.synthesizeMouseAtCenter(editorInput, {}, view.styleWindow); and then you don't even need the rect.
I have logged bug 1245484 to add this as an eslint warning.
Oh, don't forget to attach your patch when it is passing.
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #9)
> You should use EventUtils.synthesizeMouseAtCenter(editorInput, {},
> view.styleWindow); and then you don't even need the rect.
>
Here I actually want to click outside of the input, which is why I use rect.width as horizontal offset.
> Oh, don't forget to attach your patch when it is passing.
Yep, waiting for a green try :)
Assignee | ||
Comment 11•9 years ago
|
||
Fixed the failing test. Try looks ok.
Attachment #8714313 -
Attachment is obsolete: true
Attachment #8715792 -
Flags: review?(mratcliffe)
Attachment #8715792 -
Flags: review?(mratcliffe) → review+
Comment 13•9 years ago
|
||
Keywords: checkin-needed
Comment 14•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Assignee | ||
Comment 15•9 years ago
|
||
After using this for some time, I found one annoying use case :
- click on a rule view property to edit it
- press right arrow
ER : the caret should be visible blinking.
AR : the caret is hidden.
I would like to add 2 extra pixels here, so that the caret is still visible. The negative margin-right for the editor is increased to compensate for this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 16•9 years ago
|
||
try : https://treeherder.mozilla.org/#/jobs?repo=try&revision=114a3a5fd99c
Mike: sorry for reopening, hope you don't mind reviewing this additional change.
Attachment #8715792 -
Attachment is obsolete: true
Attachment #8718766 -
Flags: review?(mratcliffe)
Comment on attachment 8718766 [details] [diff] [review]
bug1243695.part2.v1.patch
Review of attachment 8718766 [details] [diff] [review]:
-----------------------------------------------------------------
r+ as long as try is green.
Attachment #8718766 -
Flags: review?(mratcliffe) → review+
Assignee | ||
Comment 18•9 years ago
|
||
Carry over r+. Try is green.
Attachment #8718766 -
Attachment is obsolete: true
Attachment #8719336 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 19•9 years ago
|
||
Keywords: checkin-needed
Comment 20•9 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•