Hide the color scheme simulation buttons for webextension targets
Categories
(DevTools :: Inspector, task, P2)
Tracking
(firefox95 fixed)
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jbarson, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
Bug 1733063 hides light and dark mode buttons in the inspector when no chrome on window r=jdescottes
48 bytes,
text/x-phabricator-request
|
Details | Review |
See https://bugzilla.mozilla.org/show_bug.cgi?id=1731465#c2
The rule view buttons to toggle color scheme simulation should be hidden for webextension targets because this feature requires the target to support the watcher.
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
This should be a good first bug, some pointers below on how to solve this.
When we enabled the color scheme simulation buttons, we didn't think about keeping them hidden on invalid targets.
They should be hidden by default, and only displayed for content targets, ie not chrome
targets.
We need to handle them in the same way as the "print simulation" button. To fix this bug, we should:
- 1 - add
hidden=""
to the buttons color-scheme-simulation-light-toggle and color-scheme-simulation-dark-toggle (searchfox) - 2 - modify
_initSimulationFeatures
in rules.js (searchfox) to remove thehidden
attribute on those buttons and add the listeners only when!this.currentTarget.chrome
. There is already aif
statement for the print simulation button, so we can reuse it - 3 - ideally, update the test
devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_inspector.js
to check that the buttons are hidden for an addon toolbox
This looks to be a good one for me to tackle for a first bug, Can I be assigned to this?
Reporter | ||
Comment 3•3 years ago
|
||
Hi jbarson! Thanks for offering to take this, assigning the bug to you.
You can find documentation about the development environment at https://firefox-source-docs.mozilla.org/ and if you need any help you can either ask on this bug (make sure to use "Request information from" to ping me) or on our chat: https://chat.mozilla.org/#/room/#devtools:mozilla.org
Thanks Julian. I have my environment set up, so many moving parts in this project. :)
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/77b2785ec40f hides light and dark mode buttons in the inspector when no chrome on window r=jdescottes
Comment 7•3 years ago
|
||
bugherder |
Description
•