Double clicking header value select a portion of the header name
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: josh, Unassigned, Mentored, NeedInfo)
Details
(Keywords: good-first-bug)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0
Steps to reproduce:
- Open devtools network inspector
- Navigate to mozilla.org
- In the devtools network inspector, select the request for
https://www.mozilla.org
- In the Request Headers panel, scroll down to a header such as
x-frame-options: DENY
- Double click the value
DENY
Actual results:
A part of the header name (options
) was selected as well as the value
Expected results:
Only the header value should have been selected.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
I will fix this.
Currently, the colon is being added in TreeView.css
(line 37). The described behavior occurs anywhere a tree is rendered. There is not a word-breaking character between the key and value since content added through CSS is not a part of the regular DOM.
A simple option to fix this is add the colon in LabelCell.js
(line 69) when renderSuffix
is falsy and remove the colon from CSS. This would break tests because the colon is now included in the HTML, but they could be easily modified to expect this new behavior.
This would also change behavior when copying and pasting since the colon would be included. Personally, I would prefer this when using dev tools.
:bomsy does this approach sound logical to you or do you have an alternative method you would recommend?
Comment 3•3 years ago
|
||
Sure. i agree lets go that direction.
I'm assigning to you.
Thanks
Comment 4•3 years ago
|
||
Comment 5•3 years ago
|
||
Adding my comment from Phabricator here...
Wed, Feb 16, 6:28 PM
I just discovered that multiple different CSS files revert the content of .treeTable .treeLabelCell::after back to "".
Example of this:
// devtools/client/netmonitor/src/assets/styles/NetworkDetailsBar.css:485
.network-monitor .security-panel .treeTable .treeLabelCell::after,
.network-monitor .treeTable .tree-section .treeLabelCell::after {
content: "";
}
I will continue to stew about the best way to implement this change, since it can't happen on all instances of .treeTable .treeLabelCell. Any insight you have would be appreciated :bomsy.
Also, thank you for helping me get started on my journey contributing to Mozilla!
Comment 6•3 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
I'm going to try to pick this up, probably persuing a similar method as the previous contributor.
One thing I noticed is that fixing this makes apparent that there's another secret bug with header selection. The .treeValueCell has a leading 39px padding which overlaps the .treeLabelCell which prevents the last ~30px of the label from being selected.
https://i.imgur.com/VLAe8Ve.png
That padding (and the negative margin) on the label could be removed, but then it changes how long header values are wrapped (the padding so so wrapped values appear aligned under the label, rather than the [?] icon). It might be possible to fiddle with z-index to leave the padding to mitigate this, but I'll continue to investigate early next week.
r=bomsy
Moves the colon seperator into the JS/HTML rather than as a CSS psuedo
element. Also raises the z-index of the header label to prevent the
value from overlapping it.
Updated•2 years ago
|
Description
•