Closed
Bug 1144982
Opened 10 years ago
Closed 8 years ago
"Auto Prettify Minified Sources" doesn't recognize some minified sources as being minified
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: karlcow, Unassigned)
References
()
Details
Attachments
(3 files)
Steps to reproduce:
0. Open Developer Tools Debugger
1. Go to http://www.tesco.com/direct/the-hunger-games-mockingjay-part-1-blu-ray/653-3702.prd?pageLevel=&skuId=653-3702
(WAIT - heavy site)
2. Search under www.testo.com for the script main-built.js
3. Click on it.
Actual: It stays packed.
Expected: It should un-minify like others.
Cut and paste the full code in the scratchpad, click on Pretty Print. The code is being un-minified.
Maybe Related to Bug 1114929?
Reporter | ||
Updated•10 years ago
|
Comment 1•10 years ago
|
||
(In reply to Karl Dubost :karlcow from comment #0)
> Maybe Related to Bug 1114929?
Doubt it, CSS and JS pretty printing don't share a code base.
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Do you see any possibly related errors in the browser console (Cmd + Shift + J)?
Flags: needinfo?(kdubost)
Reporter | ||
Comment 5•10 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #1)
> Doubt it, CSS and JS pretty printing don't share a code base.
Doh! Count that on my too long time spent in the console. Sorry about that.
(In reply to Nick Fitzgerald [:fitzgen] from comment #2)
> Created attachment 8579781 [details]
> works for me inside debugger
Ah interesting we really have a difference of behavior. Let's see. I'm using Firefox 36.0.1. See Screenshot.
I have braces "{}" and "Auto-minify selected" and "Show original source"
Let me try with Nightly. Same behavior.
Going back to 36.0.1
That said clicking on the "{}" to strike it, it prettifies it. Weird.
Or maybe I'm getting the meaning reversed.
For me:
* '{}' == un-minified
* '{}/' == original
If my understanding is wrong, I will just close that bug, and beat myself ;)
Flags: needinfo?(kdubost)
Reporter | ||
Comment 6•10 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #2)
> Created attachment 8579781 [details]
> works for me inside debugger
Note that it "didn't work", There's no syntax coloring at all in your screenshot. It's all weird this behavior. Compare with other JS for the same site.
Comment 7•10 years ago
|
||
(In reply to Karl Dubost :karlcow from comment #6)
> (In reply to Nick Fitzgerald [:fitzgen] from comment #2)
> > Created attachment 8579781 [details]
> > works for me inside debugger
>
> Note that it "didn't work", There's no syntax coloring at all in your
> screenshot. It's all weird this behavior. Compare with other JS for the same
> site.
When JS files are too big, we stop syntax highlighting because it can get slow.
Comment 8•10 years ago
|
||
(In reply to Karl Dubost :karlcow from comment #5)
> Let me try with Nightly. Same behavior.
Same behavior as me?
>
> Going back to 36.0.1
> That said clicking on the "{}" to strike it, it prettifies it. Weird.
> Or maybe I'm getting the meaning reversed.
> For me:
> * '{}' == un-minified
> * '{}/' == original
>
{} should be "click to prettify"
{}/ should be "click to revert to the source as it is"
Reporter | ||
Comment 9•10 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #8)
> Same behavior as me?
Nightly same behavior than 36.0.1
> > * '{}' == un-minified
> > * '{}/' == original
> >
>
> {} should be "click to prettify"
> {}/ should be "click to revert to the source as it is"
Hmm confusing.
I described a state, you described an action. And I was wrong in my state description. See PS2:.
Let's experiment:
# Exhibit 1
setUp:
- On www.mozilla.org
- [Pref] Unchecked Autoprettify Minified sources
- [Pref] Unchecked Show original sources
- "{}"
1. Accessing site-bundle.….js shows a script on 1 line
2. Click on "{}" -> "{}/": Prettify the source. button is on
3. Click on "{}/" -> "{}" : Unprettify the source. button is off.
4. Checked original source. Doesn't change anything. (Normal)
5. Checked Autoprettify Minified sources
- Nothing changes. icon is "{}"
- click on tabzilla. Go back to site-bundle.
- the source is being prettified and the icon is now "{}/"
Redoing the same sequence than I just did on Mozilla on tesco Web site.
So the difference in between Mozilla and Tesco is that
**Auto-Prettify is not happening**.
To prettify, you need to push the button "{}"->"{}/". I guess that created my confusion.
Is it what was expected?
PS1: Nick. Thanks for helping. Your questions forced me to refine my explanation and found the difference.
PS2: (separate issue maybe) The icon is confusing. Cognitively, I interpret the bar as NOT. I wonder if I'm alone.
The "{}/" == On == prettified
The "{}" == Off == not prettified
Comment 10•10 years ago
|
||
(In reply to Karl Dubost :karlcow from comment #9)
> (In reply to Nick Fitzgerald [:fitzgen] from comment #8)
> Hmm confusing.
> I described a state, you described an action. And I was wrong in my state
> description. See PS2:.
Let's discuss that in a separate bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1145446
> 5. Checked Autoprettify Minified sources
> - Nothing changes. icon is "{}"
> - click on tabzilla. Go back to site-bundle.
> - the source is being prettified and the icon is now "{}/"
Ah ok, yeah we don't actively watch changes to that option. Only check on switching sources and refresh, I believe.
This is a bug -- we should re-check when the option changes.
> Redoing the same sequence than I just did on Mozilla on tesco Web site.
>
> So the difference in between Mozilla and Tesco is that
> **Auto-Prettify is not happening**.
> To prettify, you need to push the button "{}"->"{}/". I guess that created
> my confusion.
>
> Is it what was expected?
Our heuristic for automatically detecting minified sources is probably just not catching this case. This is another bug.
Updated•10 years ago
|
Summary: Unminifying JavaScript is not working in some circumstances → "Auto Prettify Minified Sources" doesn't recognize some minified sources as being minified
Comment 11•8 years ago
|
||
I'm closing this bug as I believe it does not affect the new UI. Please correct me if I'm wrong.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 12•8 years ago
|
||
CONFIRMED. As the auto-unminification doesn't exist anymore (unfortunately). Thanks.
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•