Closed Bug 1508748 Opened 2 years ago Closed 2 years ago

Track Changes - Disabling and then deleting a declaration by removing its value is not properly tracked

Categories

(DevTools :: Inspector, defect, P2)

65 Branch
Unspecified
All
defect

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: paul.boiciuc, Assigned: rcaliman)

References

(Depends on 2 open bugs)

Details

Attachments

(3 files)

Attached video Multiple records.mp4
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Build ID: 20181120100045

[Precondition]

Navigate to about:config and enable the Changes feat. ( devtools.inspector.changes.enabled - true) 

[STR]
1. Launch Firefox, navigate to a random web page (e.g bugzilla.mozilla.org) and open the Inspector.
2. Navigate to the 2nd pane and disable a declaration.
3. Delete the value of the newly disabled property and observe the Changes tab. 
4. Disable another property from the same block and observe the Changes tab.

[AR]
Disabling a property is properly tracked but when the user deletes the value of that disabled property, the Changes tab records the same change again. This issue does not reproduce if the user removes the name of the disabled property.
In some cases, when the user performs the same action within a block, the records multiply. 
  
I have attached a short video for better understanding.

[ER]
Deleting the value of the disabled property is not tracked (as the case is when the same action is performed on the name of the property). There is already a recorded change for disabling/removing the property, and adding another one is redundant. The same rule applies to the 2nd part of the issue, as there is no need for multiple records of the same change.
This is not a blocking issue, but I've marked it like this for better visibility and tracking inside the meta bug.
Blocks: 1503920
Summary: Track Changes - Disabling and then deleting a declaration is not properly tracked → Track Changes - Disabling and then deleting a declaration by removing its value is not properly tracked
I may be wrong, but running Mozregression indicates that this behavior could have been a cause of the changes performed here: https://hg.mozilla.org/integration/autoland/rev/aa12eedecb79
Attached video multiplying records.mp4
On further testing, it would seem that multiplying the records can be triggered even without deleting a new property and can be done by disabling and re-enabling related declarations. I have attached a new short video.
Assignee: nobody → rcaliman
Status: NEW → ASSIGNED
Priority: -- → P2
When a declaration is disabled, it is tracked as removed in the Changes panel.
When deleting a disabled declaration, we take care not track it as removed again.

Includes stricter checks when matching previously tracked added and removed declarations.
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d1eeceace1b
Avoid duplicate tracking of the same removed CSS declaration. r=pbro
https://hg.mozilla.org/mozilla-central/rev/9d1eeceace1b
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Depends on: 1513223
You need to log in before you can comment on or make changes to this bug.