Closed Bug 1538108 Opened 5 years ago Closed 5 years ago

Hide the computed longhand expander in the new rule-view when the computed values are empty


(DevTools :: Inspector: Rules, enhancement, P2)



(firefox68 fixed)

Firefox 68
Tracking Status
firefox68 --- fixed


(Reporter: pbro, Assigned: pong7219)


(Blocks 1 open bug)



(1 file)

In bug 1535315 we made a change to the rule-view that hides the computed longhand expander icon when the computed properties don't have values.
This happens when a CSS variable is used in the shorthand's value, because that prevents devtools from successfully deriving the values for the longhands.

We want to do the same thing in the new rule-view.

Gabriel's suggestion for this:

We could potentially add the shouldShowComputedExpander property from TextPropertyEditor (something like hasComputed) into the TextProperty model and also fix this in the new rules view.

The relevant bits of the code are in

Adding a new property in the model that we will want to access in the components will need to be added to the reducer and types

Blocks: dt-rules

Hi Patrick,

May I work on this bug?


Sure! I see you've worked on DevTools bugs before, so I guess you are good getting started on your own?
If you need any more help, please let us know. I think Gabriel (:gl on bugzilla) is the best person to help you on this particular bug.

The goal is to put this logic (whether a declaration has any computed longhands that are worth showing) in common between the old and the new rule-view (the new one being written now in React).
And then implement the necessary changes in the new rule-view's redux and react components to hide/show the expander icon based on that.
Hopefully the links provided by Gabriel above are enough to get started.

I'm assigning the bug to you now.

Assignee: nobody → pong7219

Hi Patrick,

Thank you! Yes, those links are very helpful :) I'll look at them and send a patch so we can start a conversation there.

Pushed by
Hide the computed expander and shorthand overridden list in the new rules view when the computed values are empty r=gl
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.