Submitter | Angel Ezquerra |
---|---|
Date | Dec. 3, 2012, 11:41 p.m. |
Message ID | <62f1adcd73969f967098.1354578116@Lucia-PC> |
Download | mbox | patch |
Permalink | /patch/5/ |
State | Superseded |
Headers | show |
Comments
On Tue, 2012-12-04 at 00:41 +0100, Angel Ezquerra wrote: > # HG changeset patch > # User Angel Ezquerra <angel.ezquerra at gmail.com> > # Date 1354578089 -3600 > # Node ID 62f1adcd73969f967098c08000ca50f129bcfd59 > # Parent 41d3a5a1c8495cd599e5b422fddcdf93609b8101 > hgweb: add RSS and Atom subscribe buttons to the main paper template pages > > The buttons are found at the bottom of each page. They are similar to the > monoblue template buttons, but their colors have been changed to better match > the patper black, grey and white color palette of the paper style. Three things I would do differently: a) use the standard icon (ie from feedicons.com) b) link to only the Atom feed c) put the icon under the menu on the left Once upon a time it made sense to offer two types of feeds: when clients might only have RSS support, but you had content that would actually work better with Atom. But every client has supported atom feeds for years now (anyone have a counterexample?), so we should simply use it. We're syndicating HTML, so Atom is technically more suited. Also, Atom is an IETF standard rather than.. well, go read about RSS versions. Adding two links to paper that basically do the same thing is just clutter. (Alternately, if people REALLY think there's a problem with Atom, then we should just advertise the RSS feeds.) If at some point we switch the other styles over to use the icon, we should just use one icon there as well. The old RSS subscriptions should continue to work, of course.
On Tue, Dec 4, 2012 at 9:32 AM, Matt Mackall <mpm at selenic.com> wrote: > On Tue, 2012-12-04 at 00:41 +0100, Angel Ezquerra wrote: >> # HG changeset patch >> # User Angel Ezquerra <angel.ezquerra at gmail.com> >> # Date 1354578089 -3600 >> # Node ID 62f1adcd73969f967098c08000ca50f129bcfd59 >> # Parent 41d3a5a1c8495cd599e5b422fddcdf93609b8101 >> hgweb: add RSS and Atom subscribe buttons to the main paper template pages >> >> The buttons are found at the bottom of each page. They are similar to the >> monoblue template buttons, but their colors have been changed to better match >> the patper black, grey and white color palette of the paper style. > > Three things I would do differently: > > a) use the standard icon (ie from feedicons.com) > b) link to only the Atom feed > c) put the icon under the menu on the left > > Once upon a time it made sense to offer two types of feeds: when clients > might only have RSS support, but you had content that would actually > work better with Atom. > > But every client has supported atom feeds for years now (anyone have a > counterexample?), so we should simply use it. We're syndicating HTML, so > Atom is technically more suited. Also, Atom is an IETF standard rather > than.. well, go read about RSS versions. Adding two links to paper that > basically do the same thing is just clutter. (Alternately, if people > REALLY think there's a problem with Atom, then we should just advertise > the RSS feeds.) > > If at some point we switch the other styles over to use the icon, we > should just use one icon there as well. The old RSS subscriptions should > continue to work, of course. I think this is a good idea. Actually I also thought that having 2 buttons is a little uncommon, since most pages only show a single "feed button". However I decided to follow the example of the existing buttons on the monoblue theme since I did not know which feed is the best of the two. Would it make sense to add a config option that let you choose which type of feed you want to advertise on this new, single button (the default would be atom as you suggest)? The only issue I see with using the atom feed by default is that I could not get the atom-branches feed (which I added on the other patch I sent to the list yesterday) to work. If anyone can help me with that it would be awesome. Cheers, Angel
On Tue, 2012-12-04 at 09:45 +0100, Angel Ezquerra wrote: > On Tue, Dec 4, 2012 at 9:32 AM, Matt Mackall <mpm at selenic.com> wrote: > > On Tue, 2012-12-04 at 00:41 +0100, Angel Ezquerra wrote: > >> # HG changeset patch > >> # User Angel Ezquerra <angel.ezquerra at gmail.com> > >> # Date 1354578089 -3600 > >> # Node ID 62f1adcd73969f967098c08000ca50f129bcfd59 > >> # Parent 41d3a5a1c8495cd599e5b422fddcdf93609b8101 > >> hgweb: add RSS and Atom subscribe buttons to the main paper template pages > >> > >> The buttons are found at the bottom of each page. They are similar to the > >> monoblue template buttons, but their colors have been changed to better match > >> the patper black, grey and white color palette of the paper style. > > > > Three things I would do differently: > > > > a) use the standard icon (ie from feedicons.com) > > b) link to only the Atom feed > > c) put the icon under the menu on the left > > > > Once upon a time it made sense to offer two types of feeds: when clients > > might only have RSS support, but you had content that would actually > > work better with Atom. > > > > But every client has supported atom feeds for years now (anyone have a > > counterexample?), so we should simply use it. We're syndicating HTML, so > > Atom is technically more suited. Also, Atom is an IETF standard rather > > than.. well, go read about RSS versions. Adding two links to paper that > > basically do the same thing is just clutter. (Alternately, if people > > REALLY think there's a problem with Atom, then we should just advertise > > the RSS feeds.) > > > > If at some point we switch the other styles over to use the icon, we > > should just use one icon there as well. The old RSS subscriptions should > > continue to work, of course. > > I think this is a good idea. Actually I also thought that having 2 > buttons is a little uncommon, since most pages only show a single > "feed button". However I decided to follow the example of the > existing buttons on the monoblue theme since I did not know which feed > is the best of the two. > > Would it make sense to add a config option that let you choose which > type of feed you want to advertise on this new, single button (the > default would be atom as you suggest)? Do you have some reason to think that someone will ever have a good reason to care? I do not. Let's wait for that person to show up and complain instead. > The only issue I see with using the atom feed by default is that I > could not get the atom-branches feed (which I added on the other patch > I sent to the list yesterday) to work. If anyone can help me with that > it would be awesome. Make sure you: a) have an appropriate entry in the map b) restart your server c) use force-reload to bypass HTTP caching
On Tue, Dec 4, 2012 at 9:47 PM, Matt Mackall <mpm at selenic.com> wrote: > On Tue, 2012-12-04 at 09:45 +0100, Angel Ezquerra wrote: >> On Tue, Dec 4, 2012 at 9:32 AM, Matt Mackall <mpm at selenic.com> wrote: >> > On Tue, 2012-12-04 at 00:41 +0100, Angel Ezquerra wrote: >> >> # HG changeset patch >> >> # User Angel Ezquerra <angel.ezquerra at gmail.com> >> >> # Date 1354578089 -3600 >> >> # Node ID 62f1adcd73969f967098c08000ca50f129bcfd59 >> >> # Parent 41d3a5a1c8495cd599e5b422fddcdf93609b8101 >> >> hgweb: add RSS and Atom subscribe buttons to the main paper template pages >> >> >> >> The buttons are found at the bottom of each page. They are similar to the >> >> monoblue template buttons, but their colors have been changed to better match >> >> the patper black, grey and white color palette of the paper style. >> > >> > Three things I would do differently: >> > >> > a) use the standard icon (ie from feedicons.com) >> > b) link to only the Atom feed >> > c) put the icon under the menu on the left >> > >> > Once upon a time it made sense to offer two types of feeds: when clients >> > might only have RSS support, but you had content that would actually >> > work better with Atom. >> > >> > But every client has supported atom feeds for years now (anyone have a >> > counterexample?), so we should simply use it. We're syndicating HTML, so >> > Atom is technically more suited. Also, Atom is an IETF standard rather >> > than.. well, go read about RSS versions. Adding two links to paper that >> > basically do the same thing is just clutter. (Alternately, if people >> > REALLY think there's a problem with Atom, then we should just advertise >> > the RSS feeds.) >> > >> > If at some point we switch the other styles over to use the icon, we >> > should just use one icon there as well. The old RSS subscriptions should >> > continue to work, of course. >> >> I think this is a good idea. Actually I also thought that having 2 >> buttons is a little uncommon, since most pages only show a single >> "feed button". However I decided to follow the example of the >> existing buttons on the monoblue theme since I did not know which feed >> is the best of the two. >> >> Would it make sense to add a config option that let you choose which >> type of feed you want to advertise on this new, single button (the >> default would be atom as you suggest)? > > Do you have some reason to think that someone will ever have a good > reason to care? I do not. Let's wait for that person to show up and > complain instead. > >> The only issue I see with using the atom feed by default is that I >> could not get the atom-branches feed (which I added on the other patch >> I sent to the list yesterday) to work. If anyone can help me with that >> it would be awesome. > > Make sure you: > > a) have an appropriate entry in the map > b) restart your server > c) use force-reload to bypass HTTP caching Actually I believe that the existing tags atom feed does not work either, or at least it does not work for me. The feed is empty. If I modify the existing atom/tags.tmpl file and I remove the "{latestentry%feedupdated}" line then it works fine. The same thing happens for the new atom/branches.tmpl file that I made. I don't know why this can be, since other atom templates have that line as well and they do work fine... Angel
Patch
diff --git a/mercurial/templates/paper/bookmarks.tmpl b/mercurial/templates/paper/bookmarks.tmpl --- a/mercurial/templates/paper/bookmarks.tmpl +++ b/mercurial/templates/paper/bookmarks.tmpl @@ -43,6 +43,12 @@ </tr> {entries%bookmarkentry} </table> +<div class="page-footer"> +<ul class="rss-logo"> + <li><a href="{url}rss-bookmarks">RSS</a></li> + <li><a href="{url}atom-bookmarks">Atom</a></li> +</ul> +</div> </div> </div> diff --git a/mercurial/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl --- a/mercurial/templates/paper/branches.tmpl +++ b/mercurial/templates/paper/branches.tmpl @@ -54,6 +54,12 @@ </tr>' } </table> +<div class="page-footer"> +<ul class="rss-logo"> + <li><a href="{url}rss-branches">RSS</a></li> + <li><a href="{url}atom-branches">Atom</a></li> +</ul> +</div> </div> </div> diff --git a/mercurial/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl --- a/mercurial/templates/paper/graph.tmpl +++ b/mercurial/templates/paper/graph.tmpl @@ -117,6 +117,13 @@ | rev {rev}: {changenav%navgraph} </div> +<div class="page-footer"> +<ul class="rss-logo"> + <li><a href="{url}rss-log">RSS</a></li> + <li><a href="{url}atom-log">Atom</a></li> +</ul> +</div> + </div> </div> diff --git a/mercurial/templates/paper/shortlog.tmpl b/mercurial/templates/paper/shortlog.tmpl --- a/mercurial/templates/paper/shortlog.tmpl +++ b/mercurial/templates/paper/shortlog.tmpl @@ -64,6 +64,13 @@ | rev {rev}: {changenav%navshort} </div> +<div class="page-footer"> +<ul class="rss-logo"> + <li><a href="{url}rss-log">RSS</a></li> + <li><a href="{url}atom-log">Atom</a></li> +</ul> +</div> + </div> </div> diff --git a/mercurial/templates/paper/tags.tmpl b/mercurial/templates/paper/tags.tmpl --- a/mercurial/templates/paper/tags.tmpl +++ b/mercurial/templates/paper/tags.tmpl @@ -43,7 +43,16 @@ </tr> {entries%tagentry} </table> -</div> + +<div class="page-footer"> +<ul class="rss-logo"> + <li><a href="{url}rss-tags">RSS</a></li> + <li><a href="{url}atom-tags">Atom</a></li> +</ul> </div> +</div> +</div> + + {footer} diff --git a/mercurial/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css --- a/mercurial/templates/static/style-paper.css +++ b/mercurial/templates/static/style-paper.css @@ -312,3 +312,40 @@ .block { border-top: 1px solid #999; } + +div.page-footer { + margin: 50px 0 0; + position: relative; +} + div.page-footer p { + position: relative; + left: 20px; + bottom: 5px; + font-size: 1.2em; + } + ul.rss-logo { + position: absolute; + top: -10px; + right: 20px; + height: 20px; + list-style-type: none; + } + ul.rss-logo li { + display: inline; + } + ul.rss-logo li a { + padding: 3px 6px; + line-height: 10px; + border:1px solid; + border-color:#999999 #555555 #555555 #999999; + color:#333333; + background-color:#ffffff; + font-weight:bold; + font-family:sans-serif; + font-size:10px; + text-align:center; + text-decoration:none; + } + div.rss-logo li a:hover { + background-color:#ee5500; + }