openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 918 forks source link

Note RSS feed contains too much information and too many timestamps #1044

Open simon04 opened 9 years ago

simon04 commented 9 years ago

Reading a feed of notes (/api/0.6/notes/feed?bbox=) on mobile or text-based readers is confusing (screenshot from Owncloud News):

selection_106

This is due to:

I propose to largely simplify the text content:

For the former, the implementation is as short as (plus some additional clean up)

diff --git a/app/views/notes/feed.rss.builder b/app/views/notes/feed.rss.builder
index e663d94..ef85064 100644
--- a/app/views/notes/feed.rss.builder
+++ b/app/views/notes/feed.rss.builder
@@ -18,9 +18,7 @@ xml.rss("version" => "2.0",
         xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
         xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)

-        xml.description do
-          xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ])
-        end
+        xml.description comment.body

         if comment.author
           xml.dc :creator, comment.author.display_name
tomhughes commented 9 years ago

That is supposed to be a feed of changes, so is primarily driven by recent comments and those are, as you say, the principle information.

Unfortunately a comment on it's own may not be very meaningful, which is why the rest of the note is then shown.

I'm not sure why a feed reader would throw away a div - in my experience they will render pretty much whatever HTML you throw at them within reason.

simon04 commented 9 years ago

I agree that the context might be helpful – that would speak for my second proposal.

Trac however shows only the new comment on ticket updates (e.g., https://josm.openstreetmap.de/timeline?format=rss&ticket=on&ticket_details=on).

I also tested newsbeuter which nicely displays <ol>/<ul> lists, but discards <div>s. :smile: