Open Bug 1652802 Opened 4 years ago Updated 4 years ago

Indicator for adding a property to a rule

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

Details

User Story

When hovering a rule, I want to have an indicator that a click adds a rule and where so that I can discover the interaction and know with confidence a click does.
Keywords: good-first-bug

Hello, can I work on this?

I will add a few words of caution that this change has subtle but important effects, and therefore is not a good-first-bug:

  • When tracking CSS changes, the Changes panel holds the index of CSS declarations previously changed. Adding a new CSS declaration someplace else other than at the end of a CSS Rule will invalidate the previously stored indices. When making changes to the now shifted CSS declarations, their indices won't match the client, thus confusing the algorithm to coalesce changes. The latest change may appear to be done to another declaration, thus confusing ueser. Either the indices for previously tracked CSS changes will need to be shifted when a CSS declaration is added ahead of them, or we need to adjust the change tracking logic. A somewhat related issue is tracked in bug 1511627.

  • Disabling a CSS declaration is done by wrapping it with a CSS comment within the CSS text of its CSS rule. These are also marked by offsets. Adding CSS declarations before a disabled CSS declaration, then enabling it again may have errors because the offsets have shifted. To be investigated.

Before jumping in to add this functionality, we need to take some time to study the implications. The Rules panel has evolved over many years with the limitation that CSS declarations are added only at the end of the rule. Therefore, there are some built-in assumptions in the code which we need to revise.

Also sounds like we're still debating the design :). Will remove the good-first-bug label for now.

Sorry Elaine - let us know if you need help finding a different bug!

You need to log in before you can comment on or make changes to this bug.