Use a single grid layout for the devtools fission preference popup
Categories
(DevTools :: General, task, P5)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: jdescottes, Assigned: codywelsh, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(2 files)
See https://phabricator.services.mozilla.com/D84197#inline-480720
The devtools preference popup is using two grid containers:
- one for the header
- one for each preference list item
We could have a single grid layout using subgrid, which could allow to align the toggle and reset buttons.
The popup is declared at https://searchfox.org/mozilla-central/source/devtools/client/devtools-fission-prefs.js
Comment 1•5 years ago
|
||
setting this as a good-first-bug if someone wants to play with subgrid :)
Assignee | ||
Comment 2•5 years ago
|
||
Hi,
I'd love to start contributing to DevTools; this looks like it may be a good candidate. I'll have to read up a bit on documentation (and subgrid) to make a proper submission, but feel free to suggest anything else I might need to be aware of in the meantime. :)
Thanks! I'll prod for any questions that may arise.
Assignee | ||
Comment 3•5 years ago
|
||
Sorry for the delay! I successfully enveloped the whole thing in a nicely-aligned grid with associated subgrids; the only thing I need to do now is prime myself with regards to differences between git
and hg
, as I have never used Mercurial before now (and make sure my code meets standards with a once-over, of course). I also probably need a Phabricator
account, if I remember correctly.
Comment 4•5 years ago
|
||
Hey Cody, this is great!
You can read https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmozilla/index.html to get some mercurial knowledge
and https://firefox-source-docs.mozilla.org/devtools/contributing/making-prs.html?highlight=moz%20phab to see how to push your patch to review.
Hope this helps, don't hesitate to ask any question :)
Assignee | ||
Comment 5•5 years ago
|
||
Hi, Nicolas,
Sounds good! I did have one (potentially out of scope?) question on my mind - is there a reason we are explicitly setting each individual style property of the nodes, instead of assigning them iteratively from an Object of some sort? (E.g., instead of container.style.x = "y", we have some object composed of { x: "y", foo: "bar", ... } which we then iterate upon.)
Otherwise, I'll submit a PR as soon as I can! Thanks. I'll ask for anything else that I think of. :)
Reporter | ||
Comment 6•5 years ago
|
||
(In reply to Cody Welsh from comment #5)
Hi, Nicolas,
Sounds good! I did have one (potentially out of scope?) question on my mind - is there a reason we are explicitly setting each individual style property of the nodes, instead of assigning them iteratively from an Object of some sort? (E.g., instead of container.style.x = "y", we have some object composed of { x: "y", foo: "bar", ... } which we then iterate upon.)
Otherwise, I'll submit a PR as soon as I can! Thanks. I'll ask for anything else that I think of. :)
Since I'm the one who wrote the initial version, I can answer here.
There's no specific reason, I used the simplest implementation I had in mind since this popup was only meant for internal development.
Feel free to change it :)
If you do so, I suggest splitting the cosmetic changes from the actual bug fix (ie grid implementation) in 2 separate commits, it will be easier to review.
Comment 7•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #6)
Since I'm the one who wrote the initial version, I can answer here.
There's no specific reason, I used the simplest implementation I had in mind since this popup was only meant for internal development.
Feel free to change it :)If you do so, I suggest splitting the cosmetic changes from the actual bug fix (ie grid implementation) in 2 separate commits, it will be easier to review.
Okay, sounds reasonable to me! Since it's so simple to change, I'll go ahead and do that as well. Thanks for the input!
Assignee | ||
Comment 9•5 years ago
|
||
Wraps the header container and the preferences list in a grid layout
that is meant to be a "single source of truth" for nested grids via
subgrid.
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Reduces explicit "elem.style.x = 'y' assignments by consolidating them
into associated Objects, and iterating on those to assign them to their
proper elements (with a helper function)."
Depends on D86866
Assignee | ||
Comment 11•5 years ago
|
||
Finally submitted to Phab - I had some issues related to my present lack of Mercurial comfort, but I eventually figured it out. Definitely asking about it next time I get stuck, though! Haha.
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
Description
•