"Add class" button (.cls) should be disabled when a class can't be added to the selected node
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(firefox157 fixed)
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: gopal, Mentored)
References
(Blocks 2 open bugs)
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
Attachments
(2 files)
The button should be disabled for:
- doctype
- text node
- comment node
- document / root node
- pseudo element
| Reporter | ||
Updated•10 months ago
|
| Reporter | ||
Comment 1•10 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•10 months ago
|
Hi, I would like to work this on this bug
| Reporter | ||
Comment 3•10 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•7 months ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Comment 5•7 months ago
|
||
Hello, I would like to work on this Nicolas!
Mehdi
| Reporter | ||
Comment 6•7 months 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
Comment 7•5 months ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Hi there Nicolas
I would like to work on this bug.
I am aware of the build process, so I should have that setup in no time to take a look and work on this issue.
Thanks!
Antonette
Updated•4 months ago
|
Comment 10•2 months 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 11•1 month ago
|
||
When the selected node is a pseudo element, a text node or DOCTYPE, the inputs within
the class panel are disabled instead of disabling the ".cls" button itself. The behavior
is very much like how it's done with the ":hov" button.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•25 days ago
|
Comment 12•24 days ago
|
||
Comment 13•24 days ago
|
||
| bugherder | ||
Updated•14 days ago
|
Description
•