This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2788 - favicons to indicate valid/invalid on results page
Summary: favicons to indicate valid/invalid on results page
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: Templates (show other bugs)
Version: HEAD
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
: 950 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-31 16:07 UTC by Robin Whittleton
Modified: 2007-05-04 10:56 UTC (History)
1 user (show)

See Also:


Attachments
Revised header.tmpl file with favicon support, 1st attempt (3.03 KB, text/plain)
2006-01-31 23:53 UTC, Robin Whittleton
Details
favicon for valid state (3.55 KB, image/vnd.microsoft.icon)
2006-01-31 23:54 UTC, Robin Whittleton
Details
favicon for invalid state (3.55 KB, image/vnd.microsoft.icon)
2006-01-31 23:55 UTC, Robin Whittleton
Details
2nd (and hopefully final) version (3.17 KB, text/plain)
2006-02-02 22:54 UTC, Robin Whittleton
Details
Alternative version with data URLs (3.32 KB, text/plain)
2006-02-02 23:25 UTC, Robin Whittleton
Details
Revised according to Henrik's comment - seems to work fine (3.27 KB, text/plain)
2006-02-18 16:06 UTC, Robin Whittleton
Details

Description Robin Whittleton 2006-01-31 16:07:25 UTC
It would be nice to have favicons to indicate the status of a validation. As an
example of usage, I often validate multiple pages at a time. In Firefox I have
these open as multiple tabs, each with their own icon. It'd be good to be able
to scan along the list of tabs and immediately see any pages that haven't validated.

I was thinking something as simple as a red square (invalid) or a green square
(valid) would work, but ticks and crosses would do equally well.

Adding favicons is relatively easy - just add two link elements to the head of
the results template (one for minority browsers, one for IE):

<link rel="icon" href="http://example.com/favicon.ico" />
<link rel="shortcut icon" href="http://example.com/favicon.ico" />
Comment 1 Robin Whittleton 2006-01-31 16:10:42 UTC
(forgot to mention, I'll have a go at writing a patch for this later)
Comment 2 Robin Whittleton 2006-01-31 23:52:48 UTC
Just noticed this is pretty much a dupe of bug 950 - I didn't find it originally
because it was set to the CSS validator component. I'll leave it up to someone
else to dupe if they feel necessary. Henrik, I've copied you in on this anyway
as it seems like you'd be interested.

My patch just adds an extra section into header.tmpl that reuses the
valid/invalid switch from result.tmpl. If this is totally the wrong approach
then let me know, as I don't have an install of validator here so haven't tested it.

I've just attached the whole replacement file as I'm not sure how to use diff in
a way that gives useful results. This is my first patch to an open source
project so bear with me :) Incidentally I've been editing the file from the
0.7.1 tarball - if you want me to pull from CVS and redo the edits let me know.

I've also attached a couple of simple favicons in the valid/invalid colours.
According to Wikipedia ( http://en.wikipedia.org/wiki/Favicon )
image/vnd.microsoft.icon is the correct MIME type for .ico files so I've added
that hint to the patch.
Comment 3 Robin Whittleton 2006-01-31 23:53:59 UTC
Created attachment 401 [details]
Revised header.tmpl file with favicon support, 1st attempt
Comment 4 Robin Whittleton 2006-01-31 23:54:46 UTC
Created attachment 402 [details]
favicon for valid state
Comment 5 Robin Whittleton 2006-01-31 23:55:14 UTC
Created attachment 403 [details]
favicon for invalid state
Comment 6 Robin Whittleton 2006-02-02 22:54:56 UTC
Created attachment 404 [details]
2nd (and hopefully final) version

Minor cleanup on the output HTML, and this time tested on a local install.
Comment 7 Robin Whittleton 2006-02-02 23:25:22 UTC
Created attachment 405 [details]
Alternative version with data URLs

People on #validator wanted to see a version with data URLs because of caching
concerns. Because data URLs don't work with IE I removed it's rel="shortcut
icon" syntax as well.
Comment 8 Robin Whittleton 2006-02-06 07:47:09 UTC
Tested in Firefox 1.5.0.1, Safari 2.0.3, and Opera 9PR. The normal 'ico' version
works fine in all the browsers (although Safari doesn't show icons on the tabs
as per usual). The alternative 'data url' version works fine in Firefox and
Safari (with the usual caveats) but fails in Opera. This might be to do with my
use of PNGs, so I'll put together an 'ico' version of the data URL page later to
check.
Comment 9 Henrik Gemal 2006-02-13 12:43:02 UTC
why not:
<link rel="icon" href="data:image/png,<TMPL_IF
NAME="VALID">%89PNG%0Dblabla<TMPL_ELSE>%89PNG%0Dblabla</TMPL_IF>"
type="image/png" />
?
so that we dont have duplicate "<link rel" stuff
Comment 10 Bj 2006-02-13 12:52:28 UTC
Because we'd then have invalid PNGs for some results?
Comment 11 Robin Whittleton 2006-02-18 16:06:47 UTC
Created attachment 409 [details]
Revised according to Henrik's comment - seems to work fine

Björn - are there any results that aren't valid (or tentatively valid) or fail?
Comment 12 Bj 2006-02-18 18:55:26 UTC
What I am saying is that I don't see anything in the PNG specification that 
allows for zero-length PNG data, so "data:image/png," is an invalid PNG, and 
the Validator should not generate invalid PNGs.
Comment 13 Robin Whittleton 2006-02-18 20:12:28 UTC
That's true, but can we ever get to that state - i.e. is results ever generated
with the result being neither valid nor invalid?
Comment 14 Ville Skyttä 2006-02-18 20:15:32 UTC
Note that comment 9 contains a <TMPL_ELSE> branch, so the result can't be empty.
Comment 15 Henrik Gemal 2006-02-24 08:30:35 UTC
what is needed here before we cant get a commit?

actually this should have made a dupe of bug 950
Comment 16 Henrik Gemal 2006-02-24 08:30:49 UTC
*** Bug 950 has been marked as a duplicate of this bug. ***
Comment 17 Henrik Gemal 2006-02-24 12:14:20 UTC
While we're at it we should also change the document title.

this:
<title><TMPL_IF NAME="page_title_url">Result for <TMPL_VAR NAME="page_title_url"
ESCAPE="HTML"><TMPL_ELSE><TMPL_IF NAME="page_title"><TMPL_VAR NAME="page_title"
ESCAPE="HTML"><TMPL_ELSE>Validation Results</TMPL_IF></TMPL_IF> - W3C Markup
Validator</title>

should changed to:
<title><TMPL_IF NAME="page_title_url">Result for <TMPL_VAR NAME="page_title_url"
ESCAPE="HTML"><TMPL_ELSE><TMPL_IF NAME="page_title"><TMPL_VAR NAME="page_title"
ESCAPE="HTML"><TMPL_ELSE>Validation Results</TMPL_IF></TMPL_IF> - <TMPL_IF
NAME="VALID">Valid<TMPL_ELSE>Invalid</TMPL_IF> - W3C Markup Validator</title>

Comment 18 Robin Whittleton 2006-02-24 13:29:01 UTC
I would have originally done all this in bug #950 but it was for the CSS
Validator so I opened a new bug. Agreed about the title - I'll add your code later.
Comment 19 Ville Skyttä 2006-02-24 15:34:26 UTC
Changing the document title would result in undesirable behaviour when
bookmarking  a validation result page, don't you think?
Comment 20 Robin Whittleton 2006-02-26 10:59:37 UTC
That's a good point, and probably enough to not bother adding this. Favicons get
bookmarked as well in Firefox at least, but they update if they've changed when
you visit a site (which is what we'd want in this case).
Comment 21 Robin Whittleton 2006-03-05 17:55:11 UTC
So yeah, as Henrik said in comment #15, what is needed to get this checked in?
Is it even wanted in the system? Fair enough if it isn't of course, but a 'yes'
or 'no' would be nice :)
Comment 22 Olivier Thereaux 2006-03-05 19:01:24 UTC
Robin, 
your message in www-validator [1] did not show a lot of buy-in, and there were discussions here on 
fine implementation points, so I let some time pass. 

Are all the issues (raised here at least) now resolved, and all reasonably happy (Bjoern, any objection?) If 
so, I will commit the patches to the development codebase this week. Future beta test should show if 
users give this a thumbs up, down, or just don't care.

[1] http://lists.w3.org/Archives/Public/www-validator/2006Feb/0009
Comment 23 Bj 2006-03-05 20:50:38 UTC
I don't have any serious blockers atm.
Comment 24 Robin Whittleton 2006-03-05 22:04:39 UTC
Thanks Olivier. At the moment the 'patches' aren't really patches, just my
version of the header.tmpl file. I couldn't get my version of patch (the one
that comes with MacOS 10.4) to produce a patch that looked like any of the
others I've seen. If you want me to spend some more time looking into getting a
proper patch then let me know; otherwise I'll assume you're happy with how it is
currently.

Thanks!
Comment 25 Robin Whittleton 2006-03-05 22:13:16 UTC
Oops, just re-read #22 and realised what you were saying. Yes, I'm happy with my
current file (attachment #409 [details]), and I think this satisfies Henrik's wishes as well.
Comment 26 Olivier Thereaux 2007-03-15 04:55:52 UTC
Implemented in CVS, see:
http://lists.w3.org/Archives/Public/www-validator-cvs/2007Mar/0062
http://lists.w3.org/Archives/Public/www-validator-cvs/2007Mar/0063

Thanks a lot, Robin, Henrik and all.
Comment 27 Robin Whittleton 2007-05-04 10:56:32 UTC
For what it's worth, at some point between the Opera 8.something I originally tested this on and Opera 9.20 which I've just checked in, data URLs for favicons started working. So it's just IE that's lagging from the major desktop browsers.