Closed Bug 1567164 Opened 6 months ago Closed 6 months ago

Export Changes - Copy Rule does not copy CSS Rule text

Categories

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

defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox68 unaffected, firefox69 verified, firefox70 verified)

VERIFIED FIXED
Firefox 70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- verified
firefox70 --- verified

People

(Reporter: rcaliman, Assigned: rcaliman)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The patch for Bug 724505 changed the output format of the prettifyCSS() method from a string to an object. This has a knock-on effect on the output of Copy Rule from the Changes panel which expects a string, but now receives an object.

Steps to reproduce:

  • Open DevTools Inspector
  • Make any change to a CSS rule in the Rules panel
  • Switch to the Changes panel
  • Move the mouse over tracked change and press the Copy Rule button that appears on hover.
  • Paste the clipboard content to a file

Expected result
The full contents of the changed CSS rule are pasted.

Actual
The string [Object object] is pasted.

Has STR: --- → yes

:rcaliman, could you try to find a regression range in using for example mozregression?

I encountered this same problem last week (I'm using latest Nightly). I don't recall it being an issue a month ago though.

The patch for Bug 724505 changed the return of prettifyCSS() from a string to an object and the reference in the StyleRuleActor.getRuleText() was not updated. This patch fixes this and introduces a test.

Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bdd5b5134737
Ensure StyleRuleActor.getRuleText() returns text content of minified CSS. r=gl

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #1)

:rcaliman, could you try to find a regression range in using for example mozregression?

Is a regression range still required if I already found the issue (bug 724505) which caused the regression?

Flags: needinfo?(sledru)
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70

Sounds like you found the regression range! Did you want to nominate this for Beta uplift too?

Has Regression Range: --- → yes
Flags: needinfo?(sledru)
Flags: needinfo?(rcaliman)
Flags: in-testsuite+

Comment on attachment 9079361 [details]
Bug 1567164 - Ensure StyleRuleActor.getRuleText() returns text content of minified CSS. r=gl

Beta/Release Uplift Approval Request

  • User impact if declined: Users are unable to use the "Copy Rule" functionality of the Changes panel to export their changes. This is a regression of existing functionality which users expect as a core feature of the Changes panel.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch fixes previously working functionality and has a low risk. It also introduces an automated test.
  • String changes made/needed:
Flags: needinfo?(rcaliman)
Attachment #9079361 - Flags: approval-mozilla-beta?

Thank you, Ryan!
Yes, we'd like to uplift this to Beta so it no longer impacts Beta/Developer Edition users and to ensure that Release has no blackout of the functionality in the Changes panel.

Comment on attachment 9079361 [details]
Bug 1567164 - Ensure StyleRuleActor.getRuleText() returns text content of minified CSS. r=gl

Fixes a new regression in 69 which was causing the "Copy Rule" functionality to misbehave. Thanks for including a test. Approved for 69.0b8.

Attachment #9079361 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1568293

Verified with 69.0b8, 70.0a1 (2019-07-25).

Status: RESOLVED → VERIFIED
Duplicate of this bug: 1529532
You need to log in before you can comment on or make changes to this bug.