"Add class" button (.cls) should be disabled when a class can't be added to the selected node
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Assigned: ssii.emploi, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
The button should be disabled for:
- doctype
- text node
- comment node
- document / root node
- pseudo element
| Reporter | ||
Updated•4 months ago
|
| Reporter | ||
Comment 1•4 months ago
•
|
||
this is the button we should disable https://searchfox.org/firefox-main/rev/c82adde571c24d89da3ef13f11245c8f572ba1e6/devtools/client/inspector/rules/rules.js#196
this.classToggle = doc.getElementById("class-panel-toggle");
we could do something similar to what we do for the "Add Rule" button https://searchfox.org/firefox-main/rev/c82adde571c24d89da3ef13f11245c8f572ba1e6/devtools/client/inspector/rules/rules.js#767-776
/**
* Disables add rule button when needed
*/
refreshAddRuleButtonState() {
const shouldBeDisabled =
!this._viewedElement ||
!this.inspector.selection.isElementNode() ||
this.inspector.selection.isAnonymousNode();
this.addRuleButton.disabled = shouldBeDisabled;
},
Some tests should be added to https://searchfox.org/firefox-main/rev/c82adde571c24d89da3ef13f11245c8f572ba1e6/devtools/client/inspector/rules/test/browser_rules_class_panel_toggle.js
Updated•4 months ago
|
Hi, I would like to work this on this bug
| Reporter | ||
Comment 3•3 months ago
|
||
(In reply to Areeba from comment #2)
Hi, I would like to work this on this bug
Hello Areeba, and thanks for offering help!
The bug is now assigned to you
You can follow https://firefox-source-docs.mozilla.org/setup/index.html#getting-set-up-to-work-on-the-firefox-codebase to setup the work environment.
Let me know if you have any questions!
Comment 4•1 month ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 5•1 month ago
|
||
Hello, I would like to work on this Nicolas!
Mehdi
| Reporter | ||
Comment 6•1 month ago
|
||
(In reply to mehdiakiki from comment #5)
Hello, I would like to work on this Nicolas!
Mehdi
Hello mehdiakiki, the bug is now yours :)
Let me know if you have any question
Description
•