Closed Bug 236465 Opened 20 years ago Closed 19 years ago

Give the View Selection Source window a proper name

Categories

(Toolkit :: View Source, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8final

People

(Reporter: christian.p, Assigned: rbs)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040207 Firefox/0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040207 Firefox/0.8

special characters display in "view selection source" as in the browser (ex:
é displays as é in this mode). In "view source" there is no problem.
You can test this on www.granini.fr try with the word "Découvrez"

Reproducible: Always
Steps to Reproduce:
Moving over to Browser, I see this in Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:) Gecko/20040302.
Assignee: firefox → general
Component: General → Browser-General
OS: Linux → All
Product: Firefox → Browser
QA Contact: general
Hardware: PC → All
Version: unspecified → Trunk

*** This bug has been marked as a duplicate of 164906 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
I just noted that, in their former ways, the Firefox UI folks removed "DOM
Source" from the title -- which was engineered bug 190947. It ought to be
re-instated. It is something that we thought hard on, and sweated on, before
coming up with a solution that has helped.
Reopening.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Over to firefox to fix their ui breakage.
Assignee: general → firefox
Status: UNCONFIRMED → NEW
Component: Browser-General → General
Ever confirmed: true
Product: Browser → Firefox
Version: Trunk → unspecified
QA Contact: general → aebrahim
Summary: difference between "view source" and "view selection source" → Give the View Selection Source window a proper name
See details in bug 190947.
Assignee: firefox → rbs
Status: NEW → ASSIGNED
Attachment #142967 - Flags: superreview?(bzbarsky)
Attachment #142967 - Flags: review?(doronr)
Comment on attachment 142967 [details] [diff] [review]
Put "DOM Source" in the title

Um... this needs review from one of the firefox peers (and doesn't need sr). It
looks like this just got forked before we made it better in SeaMonkey....  (not
sure _why_ it got forked, but....)
Attachment #142967 - Flags: superreview?(bzbarsky)
Attachment #142967 - Flags: review?(pch)
Attachment #142967 - Flags: review?(doronr)
Attachment #142967 - Flags: review?(pch) → review?(p_ch)
I think that "DOM Source" is not a good naming for the average user. I doubt
they even know what DOM is.
I was asked to comment... there must be somebody with a similar email address, I
am not a firefox developer.

anyways my two cents: DOM source is a good name, as it behaves much like the DOM
inspector, eg. when debugging javascript generated content, or results of an xsl
transform.
In response to comment 8, by the same token, most users don't know/care what the
page source even is. If someone is saavy enough to want to view selection
source, it's likely that they'll know what DOM is.
And it isn't constructive either just to say "DOM Source" isn't good without
suggesting anything, as this invalidates the earlier discussion (e.g., bug
164906 comment 3, bug 190947).
(In reply to comment #11)
> And it isn't constructive either just to say "DOM Source" isn't good without
> suggesting anything

:-p

How about "View generated source"? At least that is comprehensive for average
users... (or maybe not, but more than dom source)
Was already discusseed.

Comment #10 is a good summary of why "DOM Source" is a winner so far. And since
living in Seamonkey, it hasn't got a negative feeback either.
Attachment #142967 - Flags: review?(p_ch) → review?(bryner)
Comment on attachment 142967 [details] [diff] [review]
Put "DOM Source" in the title

As a rule, when you have a menu item invoke a window or dialog, the dialog
should be called the same thing as the menu item (or something very close to
it).

Why not call the window "Selection Source" instead of "DOM Source"?
Dilemma: it doesn't quite say that it is from the DOM -- this is the dilemma
that we have had. People didn't relate it to the live DOM. We got so many dups
in Seamonkey (see bug 164906), newsgroups comments, blogs, etc, until compelled
to do something about it in bug 190947.

Note: we also use it for MathML. When somebody context-clicks on a MathML
expression, it shows the equivalent MathML markup. (In this case there is no
selection). Some old screenshots when the title was simply empty:
view-mathml-src: http://www.mozilla.org/projects/mathml/screenshots/viewsource.png
view-sel-src: http://bugzilla.mozilla.org/attachment.cgi?id=79770&action=view
Comment on attachment 142967 [details] [diff] [review]
Put "DOM Source" in the title

Change the text to "Selection Source" and r=me.
Attachment #142967 - Flags: review?(bryner) → review+
Oops, I assumed you were talking to someone called "Dilemma" (who knows, this is
Mozilla after all!) and didn't read your last comment. 

formulating a better response, one moment. 
General UI principle - menu items invoking other windows/dialogs should have a
title that more or less matches the window they're invoking. 

This would imply that if the window is called "DOM Source" the context menu item
should read "View DOM Source". I don't like having the menus in a consumer
browser filled with techno acronyms like "DOM" etc that a large body of people
are unfamiliar with. If this is meant to imply a subtlety of the view source
window, why not express that subtlety explicitly there, e.g. put a panel at the
bottom of that window that says "this is generated from a live view of the
source DOM" (similar to the panel that appears at the top of .xml files rendered
in the browser content area) or something like that - I have less of a problem
explaining succinctly something in a window targeted at developers than I do
having the idiosyncracies of that window creeping into one targeted at consumers. 

While we're here, why is there a separate XUL file for viewing selection source?
This is an alternative patch to produce the title as "DOM Source of Selection",
"DOM Source of MathML". The "DOM" term is important to differentiate from the
normal source, but could be droped if there is a sort of disclaimer message,
but as this is not really critical, I am not a big fan of that option and don't
have cylces for that. It was suggested in bug 190947 as well.

>While we're here, why is there a separate XUL file for viewing selection
source?

In my original code in SeaMonkey, it is a simple overlay (primarily aimed at
factoring some subtle differences in the JavaScript handlers and the default
menu items). However, in Firebird/Firefox, the .xul was split drastically. I am
not clear why it was split that way.

seamonkey:
http://lxr.mozilla.org/mozilla/source/xpfe/browser/resources/content/viewPartialSource.xul


firefox:
http://lxr.mozilla.org/mozilla/source/toolkit/components/viewsource/content/viewPartialSource.xul
Comment on attachment 146030 [details] [diff] [review]
alternative patch

-  +	    '
onload="document.getElementById(\'target\').scrollIntoView(true)">'
+  +	    '
onload="document.title=\''+title+'\';document.getElementById(\'target\').scroll
IntoView(true)">'

This is _not_ a mistake. Seems that the title has to be set after the document
has loaded. The title doesn't show up without that work-around.
maybe we should just make this part of the web developer tools extension? 
non-web-savvy users won't use a view partial source properly anyway.
That can be extreme too. Ordinary web autors would miss out too. For example,
view-selection-source is popular with bloggers. When they want to quote each
other (as they often do), view-selection-source preserves links (people feel
that the original message loses its tone without the original links). So it can
also be a great time-savings aid for such recurrent copy-paste operations.
@see http://kairosnews.org/node/view/3352
-> view source.
Component: General → View Source
QA Contact: aebrahim → firefox.view-source
is it only me, or does the view selection source window have no title at all
right now? (except "Mozilla Firefox")

I would expect it to have a title like "Selection source of:
http://whatever.com/bla.html" (and a info-panel as suggesten in #18)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040813
Firefox/0.9.1+
*** Bug 273739 has been marked as a duplicate of this bug. ***
Comment on attachment 146030 [details] [diff] [review]
alternative patch

ben, what do you think of this now? It gives a simple hint that it is not the
original source. And can be customized without further coding.
Attachment #146030 - Flags: review?(bugs)
*** Bug 275556 has been marked as a duplicate of this bug. ***
*** Bug 276479 has been marked as a duplicate of this bug. ***
*** Bug 277283 has been marked as a duplicate of this bug. ***
*** Bug 277699 has been marked as a duplicate of this bug. ***
*** Bug 274853 has been marked as a duplicate of this bug. ***
*** Bug 281829 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.1?
*** Bug 293886 has been marked as a duplicate of this bug. ***
Comment on attachment 146030 [details] [diff] [review]
alternative patch

>@@ -71,6 +71,7 @@
>   <script type="application/x-javascript" src="chrome://global/content/viewPartialSource.js"/>
> 
>   <stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
>+  <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>

This is probably okay, and a step in the direction of not having paired
viewSource xul files.

> <!-- LOCALIZATION NOTE (mainWindow.title) : DONT_TRANSLATE --> 
>-<!ENTITY mainWindow.title "&brandShortName;"> 
>+<!ENTITY mainWindow.title "&brandFullName;"> 
> <!-- LOCALIZATION NOTE (mainWindow.titlemodifier) : DONT_TRANSLATE --> 
>-<!ENTITY mainWindow.titlemodifier "&brandShortName;"> 
>+<!ENTITY mainWindow.titlemodifier "&brandFullName;"> 
> <!-- LOCALIZATION NOTE (mainWindow.titlemodifierseparator) : DONT_TRANSLATE -->
> <!ENTITY mainWindow.titlemodifierseparator " - ">
> <!ENTITY mainWindow.preface "Source of: ">

These changes are already in from somewhere else, it seems.

>Index: toolkit/components/viewsource/locale/viewSource.properties
>===================================================================
>RCS file: /cvsroot/mozilla/toolkit/components/viewsource/locale/viewSource.properties,v
>retrieving revision 1.1
>diff -u -r1.1 viewSource.properties
>--- toolkit/components/viewsource/locale/viewSource.properties	22 Oct 2003 14:54:11 -0000	1.1
>+++ toolkit/components/viewsource/locale/viewSource.properties	13 Apr 2004 19:28:24 -0000
>@@ -5,3 +5,5 @@
> outOfRangeTitle   = Line not found
> outOfRangeText    = The specified line was not found.
> statusBarLineCol  = Line %1$S, Col %2$S
>+viewSelectionSourceTitle = DOM Source of Selection
>+viewMathMLSourceTitle    = DOM Source of MathML

I'm not entirely happy with this, though I understand the idea of pushing the
live DOM aspect of this... 

r=me, we can revisit the alternate solution when we have cycles to spare.
Attachment #146030 - Flags: review?(bugs) → review+
*** Bug 299543 has been marked as a duplicate of this bug. ***
Comment on attachment 146030 [details] [diff] [review]
alternative patch

Asking a=1.8b4.

This a change that should have gone in a long time ago, had the firefox
reviewers cared to listen. It is a simple change, yet very helpful at cutting
some of the many dups that distract from more important things.
Attachment #146030 - Flags: approval1.8b4?
This isn't a blocker, but I'm ok with taking this soonish.
Flags: blocking-aviary1.1? → blocking-aviary1.1-
Attachment #146030 - Flags: approval1.8b4? → approval1.8b4+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox1.1
*** Bug 300824 has been marked as a duplicate of this bug. ***
*** Bug 301601 has been marked as a duplicate of this bug. ***
*** Bug 335830 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: