Closed Bug 1733063 Opened 3 years ago Closed 3 years ago

Hide the color scheme simulation buttons for webextension targets

Categories

(DevTools :: Inspector, task, P2)

task

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: jdescottes, Assigned: jbarson, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

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.

Mentor: jdescottes
Type: defect → task
Flags: needinfo?(jdescottes)
Keywords: good-first-bug
Priority: -- → P2

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 the hidden attribute on those buttons and add the listeners only when !this.currentTarget.chrome. There is already a if 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
Flags: needinfo?(jdescottes)

This looks to be a good one for me to tackle for a first bug, Can I be assigned to this?

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

Assignee: nobody → jbarson
Status: NEW → ASSIGNED

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
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: