Closed Bug 1832213 Opened 1 year ago Closed 7 months ago

Add button in UI to trigger 'pretty print'

Categories

(DevTools :: Style Editor, enhancement, P3)

Firefox 102
Desktop
Unspecified
enhancement

Tracking

(relnote-firefox 120+, firefox120 fixed)

RESOLVED FIXED
120 Branch
Tracking Status
relnote-firefox --- 120+
firefox120 --- fixed

People

(Reporter: googol.morons, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Attached file theme.9.css.zip

Steps to reproduce:

utilize e.g. https://www.avdweb.nl/templates/yootheme/css/theme.9.css in simple html page(see attached).
in 'Dev tools' open Style Editor and 'theme.9.css' in it

Actual results:

the stylesheet is minified and there are no controls to enforce 'pretty print' on it
(there are 2 line feedsin the css file. wiping them out gives pretty-printed stylesheet in Style Editor)

Expected results:

there should be an UI control(button/menu entry) allowing to force formatting(pretty print) over (script/)stylesheet - for the case FF improperly detects 'minified' state.

Hardware: Unspecified → Desktop

The Bugbug bot thinks this bug should belong to the 'DevTools::Style Editor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Style Editor
Product: Firefox → DevTools
Type: defect → enhancement
See Also: → 1760496
Summary: Dev tools: It must be possible to enforce 'pretty print' → Add button in UI to trigger 'pretty print'
Blocks: 1760496
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
See Also: 1760496

This adds a similar button to the one we have in the Debugger that users can
click on to pretty print the stylesheet.
We disable the button when the opened file is an original file, as we don't
support pretty printing non CSS files.
This also removes the automatic pretty print that was happening on minified files.

The current test for (automatic) pretty printing is updated to check that the
button has the expected states and behaves as it should.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8bb28110eba
Add pretty print button in StyleEditor. r=devtools-reviewers,fluent-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Duplicate of this bug: 1760496
Duplicate of this bug: 1155358
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: