Closed Bug 1277828 Opened 8 years ago Closed 5 years ago

Switch text in the markup-view to symbols, names or unicode

Categories

(DevTools :: Inspector, enhancement, P3)

49 Branch
enhancement

Tracking

(firefox49 affected)

RESOLVED WONTFIX
Tracking Status
firefox49 --- affected

People

(Reporter: pbro, Unassigned)

References

(Blocks 1 open bug)

Details

Firebug has a feature to switch the display of all entities to symbols, names or Unicode representation in the markup-view.
This does not consider whether the characters were authored as HTML entities or not, but switches all of them.

This may be useful to avoid things like bug 967493 comment 3 or bug 967493 comment 13.
Inspector bug triage (filter on CLIMBING SHOES).
Priority: -- → P3
Frankly, this proposal is not a solution. It's something else entirely - a source "mode translation" tool, perhaps?

I remain unconvinced that this issue (as originally reported in BUG 967493) cannot be resolved using something better. Why?

Steps:

1 - add < to an element in your HTML source.

2 - Prove that BUG 967493 is a bug 
    i.e. view your source in Inspector, prove you're seeing "<" not "&lt;"

3 - In the Inspector right-click on your element from #1, choose "Edit as HTML"

*QED*

4 - Repeat steps 1..3 substituting &emsp; for &lt;

    Huh?

I wonder if the above can be explained with rigor and clarity to a non-moz developer (i.e., e.g. *me*).
With this feature in place you will already see &lt; (or &emsp;) in step 2, which allows you to easily identify the issue described in bug 967493.

As said bug 967493 comment 14 an authored display (i.e. show a "<" in the HTML source as "<" and a "&lt;" in the source as "&lt;") would be better, though that would be much harder to implement (see bug 967493 comment 7).

Sebastian
(In reply to Sebastian Zartner [:sebo] from comment #3)
> With this feature in place you will already see &lt; (or &emsp;) in step 2,
> which allows you to easily identify the issue described in bug 967493.
> 
> As said bug 967493 comment 14 an authored display (i.e. show a "<" in the
> HTML source as "<" and a "&lt;" in the source as "&lt;") would be better,
> though that would be much harder to implement (see bug 967493 comment 7).
> 
> Sebastian

Two things, Sebastian...

1 - You're not addressing the QED as written.

2 - As I understand from Patrick, the proposed "solution" displays entities whether or not they were originally authored as entities. That is a vague and inexact tool which, in the thick of battle, may help if you're lucky.  Frankly, View Source, Ctrl+F is no better - or worse.

Remember, some of us, me included, are dealing with (debugging, maintaining) source we have *never* seen before. Viewing a page of HTML filled with entities, most of which were not a part of the original source, is the stuff of nightmares - not a solution.

I think I should bow out now.
(In reply to Codacoder from comment #4)
> (In reply to Sebastian Zartner [:sebo] from comment #3)
> > With this feature in place you will already see &lt; (or &emsp;) in step 2,
> > which allows you to easily identify the issue described in bug 967493.
> > 
> > As said bug 967493 comment 14 an authored display (i.e. show a "<" in the
> > HTML source as "<" and a "&lt;" in the source as "&lt;") would be better,
> > though that would be much harder to implement (see bug 967493 comment 7).
> > 
> > Sebastian
> 
> Two things, Sebastian...
> 
> 1 - You're not addressing the QED as written.

What is a QED?

> 2 - As I understand from Patrick, the proposed "solution" displays entities
> whether or not they were originally authored as entities. That is a vague
> and inexact tool which, in the thick of battle, may help if you're lucky.

Again, your question "Where's that space coming from?" from bug 967493 is answered by this solution.

> Frankly, View Source, Ctrl+F is no better - or worse.
> 
> Remember, some of us, me included, are dealing with (debugging, maintaining)
> source we have *never* seen before. Viewing a page of HTML filled with
> entities, most of which were not a part of the original source, is the stuff
> of nightmares - not a solution.

You'd be able to switch between those displays, so you'd only switch entities on when debugging error like you mentioned before. As mentioned in comment 0, Firebug has this feature and it is valuable to some extent.

Better an imperfect solution now than none at all. And maybe the perfect solution later.

Sebastian
See Also: → 1296313
(In reply to Sebastian Zartner [:sebo] from comment #5)
> (In reply to Codacoder from comment #4)
> > Remember, some of us, me included, are dealing with (debugging, maintaining)
> > source we have *never* seen before. Viewing a page of HTML filled with
> > entities, most of which were not a part of the original source, is the stuff
> > of nightmares - not a solution.
> 
> You'd be able to switch between those displays, so you'd only switch
> entities on when debugging error like you mentioned before. As mentioned in
> comment 0, Firebug has this feature and it is valuable to some extent.
> 
> Better an imperfect solution now than none at all. And maybe the perfect
> solution later.

After rethinking, HTML entities are quite rare if just a few special characters like spaces (&nbsp;, &emsp;, etc.) and arrow brackets (&lt; and &gt;) are shown that way. Doing so, I'd even say that this option should be the default.

Sebastian
Product: Firefox → DevTools

I'm going to close this bug as wontfix for now as we did not reach an agreement on the usefulness of this feature.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.