Open Bug 1504869 Opened 6 years ago Updated 2 years ago

Track Changes - Changes are displayed slightly differently when deleting a declaration by removing the name as opposed to deleting the value

Categories

(DevTools :: Inspector: Changes, defect, P2)

65 Branch
Unspecified
All
defect

Tracking

(Not tracked)

People

(Reporter: paul.boiciuc, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image Capture.PNG (deleted) —
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Build ID: 20181105100136

[Precondition]

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


[STR]

1. Launch Firefox and open the Inspector.
2. Navigate to the 2nd pane and delete a declaration by removing its value.
3. Repeat step 2 but this time delete a declaration by removing its name. 
4. Observe the 2 changes in the Changes tab.


[AR]
The two actions are tracked with a slightly different display, although both actions have the same result (deleting a declaration).  

Deleting the value will translate in a tracked change that displays the property with an empty value while deleting the property name will display the entire declaration (name and value) as it was before deleting. 

I have attached a short screenshot for better understanding.

[ER]
Deleting a declaration will have the same display inside the Changes tab, regardless of whether the user deleted the name or the value (namely, the entire declaration, last state before the removal). 

I think the empty value case should not be considered as a prior state to deleting a declaration and displayed as such, but rather as mentioned above, it should be treated as a declaration delete and displayed in full.
Blocks: 1503920
I can reproduce this. Deleting the value results in a two-step deletion process, where the Changes panel shows the value with a ": ;" for a value instead of what was originally there.
Priority: -- → P2
Attached video delete value.mp4 (deleted) —
Verified this issue using the latest Nightly build (20181120100045) on Windows 10, Windows 7, Mac OS 10.13.6 and Ubuntu 16.04, and I would say that the issue is somewhat fixed. Once the user deletes the value, the change is tracked as described in this report, but once the empty value field is defocused, the property is properly removed from the Rule-View and the Changes tab reflects the change properly (it removes the "temporary" recording of the empty value property). I have attached a short video for better understanding.
If this is an acceptable behavior, I think we can close this report. 
Razvan, can you please confirm? Thanks.
Flags: needinfo?(razvan.caliman)
Attached video changes-revert-declaration-value.mp4 (deleted) —
The end result when focusing the value, deleting it, then unfocusing by moving away is correct: a single declaration is marked as removed.

However, when unfocusing by pressing the Escape key (i.e.: revert to original), there's a leftover change tracked in the Changes panel. See attachment.

I will keep this bug open as a reminder to fix that.
Assignee: nobody → rcaliman
Status: NEW → ASSIGNED
Flags: needinfo?(razvan.caliman)
The root cause of this is the same as the one for Bug 1504819. Fixing one should fix the other.
Blocks: track-changes
No longer blocks: 1503920
Component: Inspector → Inspector: Changes
Summary: [Track Changes] Changes are displayed slightly differently when deleting a declaration by removing the name as opposed to deleting the value → Track Changes - Changes are displayed slightly differently when deleting a declaration by removing the name as opposed to deleting the value
Assignee: rcaliman → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: