Rules: replace custom checkbox with -moz-appearance:checkbox
Categories
(DevTools :: Inspector: Rules, enhancement, P2)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: fvsch, Assigned: miker)
References
(Regressed 1 open bug)
Details
(Whiteboard: [dt-q])
Attachments
(8 files, 6 obsolete files)
Reporter | ||
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Reporter | ||
Comment 9•6 years ago
|
||
We can use real <input type="checkbox">
elements, keep the native style if it looks alright, and give it a custom style with -moz-appearance: none
if it doesn't.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
I decided to go with the 12px version because Victoria likes it.
@victoria does this work for you?
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Nice, thanks for working on this Mike! Couple tweaks:
- Needs more spacing between the checkbox and the text (match fvsch's mockup above)
- Labels should be 1px lower in relation to the checkbox
Assignee | ||
Comment 14•6 years ago
•
|
||
@victoria I have overlayed this new version in photoshop. The checkbox and text positions match perfectly.
The line height in the mockup is much smaller in our tools but I decided to ignore that as I think our line heights are good.
Is this okay?
Reporter | ||
Comment 15•6 years ago
|
||
On Linux with Gnome, at least with Fedora's default theme (might be different on Ubuntu, for instance), it looks like native checkboxes can be scaled up but now down.
Their minimum size seems to be 16px.
Our line height in Rules is not always fixed, but it's often 15px or 16px.
Assignee | ||
Comment 16•6 years ago
|
||
Assignee | ||
Comment 17•6 years ago
|
||
It may just be that you need to go down to 8px for the checkbox to resize.
Either way we just need to look at it and see if we need to tweak anything.
The try push should [hopefully] give us a screenshot on each of our target OSs.
Assignee | ||
Comment 18•6 years ago
|
||
Ubuntu
Assignee | ||
Comment 19•6 years ago
|
||
Assignee | ||
Comment 20•6 years ago
|
||
Reporter | ||
Comment 21•6 years ago
|
||
The line-height looks tall on Ubuntu. I'm not sure what the DPR was, but with a few guesses and calculations it kinda looks like 17px or maybe 18px? I wonder if that might come from the default margins for input[type="checkbox"]
(if they're not reset here and we're not using absolute positioning).
The macOS checkboxes look smaller overall. It looks like they render with 1px of blank space around the graphic, so a width: 12px; height: 12px;
checkbox is 10x10 visually. We can fix it using different styles (10px for everyone, 12px for macOS), or keep it like that if we don't mind the difference.
Assignee | ||
Comment 22•6 years ago
|
||
(In reply to Florens Verschelde :fvsch from comment #21)
The line-height looks tall on Ubuntu. I'm not sure what the DPR was, but with a few guesses and calculations it kinda looks like 17px or maybe 18px? I wonder if that might come from the default margins for
input[type="checkbox"]
(if they're not reset here and we're not using absolute positioning).
I can try resetting the top and bottom margins etc.
The macOS checkboxes look smaller overall. It looks like they render with 1px of blank space around the graphic, so a
width: 12px; height: 12px;
checkbox is 10x10 visually. We can fix it using different styles (10px for everyone, 12px for macOS), or keep it like that if we don't mind the difference.
Victoria likes that size and it is her call. I have to admit that I think they match the default text size perfectly on OSX.
Comment 23•6 years ago
|
||
I might be confused about something, but looks like the line height is taller in all the screenshots? (Like 4px taller than the current style?) It would be helpful to see a bigger screenshot that shows several rules.
Victoria likes that size and it is her call.
Thanks, but to clarify, I do often defer this kind of thing to Florens because they are really good at the details 🙂
Assignee | ||
Comment 24•6 years ago
|
||
Assignee | ||
Comment 25•6 years ago
|
||
Assignee | ||
Comment 26•6 years ago
|
||
Assignee | ||
Comment 27•6 years ago
|
||
Assignee | ||
Comment 28•6 years ago
|
||
Assignee | ||
Comment 29•6 years ago
|
||
Reporter | ||
Comment 30•6 years ago
|
||
To sum up discussions on Slack:
- not 100% sure a HTML checkbox will render well at small sizes on Windows and Linux (especially Linux)
- we want to try to roll out the native checkboxes on macOS first, and see if we can enable Windows and Linux later after more testing
Updated•6 years ago
|
Assignee | ||
Comment 31•6 years ago
|
||
@fvsch So now we have the resized native checkboxes on OSX and the SVG checkboxes on Windows and Linux... I am happy with this, especially as we have improved accessibility at the same time.
I hope you are happy to review this... otherwise please ping me and let me know.
Assignee | ||
Comment 32•6 years ago
|
||
Assignee | ||
Comment 33•6 years ago
|
||
fvsch wants me to try this again but using -moz-appearance:none
on the checkboxes to allow resizing outside of OSX.
Lets give it a try.
Assignee | ||
Comment 34•6 years ago
|
||
Assignee | ||
Comment 35•6 years ago
•
|
||
We are now using -moz-appearance:none
to apply the SVG checkboxes under Windows and Linux and using the native checkboxes on OSX.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Reporter | ||
Comment 38•6 years ago
•
|
||
Super happy to see this shaping up. Re. questions you had about -moz-appearance: none
making the checkbox invisible: this is probably because of the deleted line in devtools/client/jar.mn
: if we don't restore it, Firefox doesn't find the checkbox image.
Assignee | ||
Comment 39•6 years ago
|
||
Assignee | ||
Comment 40•6 years ago
|
||
Assignee | ||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
Comment 43•6 years ago
|
||
Backed out for failing dt at browser_inspector_textbox-menu.js and browser_rules_edit-selector-commit.js
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=272992243&resultStatus=testfailed%2Cbusted%2Cexception&revision=e69e9a6aa2610da603e511b1e6075926aeb46168
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=272992243&repo=autoland&lineNumber=13337
and https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=272992292&repo=autoland&lineNumber=6689
Backout: https://hg.mozilla.org/integration/autoland/rev/cf0b83b2948807e14afa9bbae298800b814c1792
Assignee | ||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 46•6 years ago
|
||
bugherder |
Comment 47•6 years ago
|
||
There seems to be a small performance regression on some inspector tests, and it might be linked to this bug:
- alert https://treeherder.mozilla.org/perf.html#/alerts?id=23608
- pushlog https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=519b6a47aa5c129c6566b5dcd954f0d75d4a091b&tochange=2521937495c4611096a75ac684f77e1dea610ca7
regression: 2-4 % on select/deselector and improvement on expandall manychildren.
The regression is small and there is also an improvement. Not necessarily worth a follow up, but maybe you have an idea about what might have caused this and want to look into it.
Assignee | ||
Comment 49•6 years ago
|
||
We also observed this.
On OSX we are now using native checkboxes but there is less of a regression there.
In the CSS we use e.g. :root[platform="linux"]
to identify the different OSes. We need to do this because Linux & Windows don't reliably resize checkboxes.
I guess :root[platform="mac"]
etc. are slow selectors so I suppose that this is what is causing the regression.
Description
•