Closed Bug 1055612 Opened 12 years ago Closed 11 years ago

parse rss feed to display on bedrock

Categories

(www.mozilla.org :: Bedrock, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbertsch, Unassigned)

References

Details

(Whiteboard: [kb=1486433] )

Attachments

(1 file)

Hi- We'd like to display content from the Voices RSS feed on the redesigned mozilla.org homepage. Exact details like the source of the feed and amount of content to display are still TBD. The live date is October 14. More info to come. Thx, Jen
Blocks: 1048408
Blocks: 1055613
No longer blocks: 1055613
As :jbertsch pointed out in comment #2 above, we do have some code for this kind of thing already. However, we need to at least update it to use the database for the cache so that we avoid the issues we found with the twitter cache for the student ambassadors page.
Whiteboard: [kb=1486433]
Display articles for each of the 5 categories.
We also need to display a small preview of each article (not the full artcle content). For example, the first paragraph of text, plus an image (if available).
Jenn, can you verify the following. 1. Is the preview the "deck" or the first paragraph up to the wordpress default character limit. 2. We can include a thumbnail, however this will be a thumbnail sized for the blog, you may need to resize the image for your specific design on the bedrock side. Once you confirm the above I will create the RSS bug for open standard with the correct spec.
Flags: needinfo?(jbertsch)
Depends on: 1073186
(In reply to Ben (:bensternthal) from comment #6) > Jenn, can you verify the following. > > 1. Is the preview the "deck" or the first paragraph up to the wordpress > default character limit. > 2. We can include a thumbnail, however this will be a thumbnail sized for > the blog, you may need to resize the image for your specific design on the > bedrock side. > > Once you confirm the above I will create the RSS bug for open standard with > the correct spec. #1 the preview is the deck #2 could we please add the correct size image to the wordpress cms and the editor workflow? :)
Flags: needinfo?(jbertsch)
Or is it easier to just resize the image on the bedrock side? Will it slow page load?
it's possible to do some limited image manipulation when we process the feed. But it'd be best to make a larger image smaller than the other way around since it could likely look bad/grainy to do the opposite.
I think we can add the "hero" image to the feed relatively easily. You could then re-size this to whatever you want. I prefer not doing anything moz specific in the feeds, the feeds could be consumed by lots of endpoints. And if the HP design changes, i'd rather not also have to update or change content in wordpress. That being said.. here is the spec thus far. 1. RSS feed should pull the 'deck' for the copy. 2. RSS feed should include the hero image. Note you will need to use the category specific feeds to pull in the latest posts. The main RSS feed contains the latest X posts across categories. Example: /category/live/feed/ /category/learn/feed/ etc...
There is a wordpress plugin for adding featured images to the rss feed: https://wordpress.org/plugins/featured-images-for-rss-feeds/. If we use something like that then we can ensure a uniform size for the images at the source, which is very important-- otherwise we could end up with stretched, squashed, or badly cropped images on the homepage. This particular plugin also allows easy custom styling for how the image shows in various feed readers, so this would also benefit other consumers of the feed.
Agree and thanks for the plugin link.
Featured image size in the Open Standard module home page section is: 460px width 150px height
I'm not sure what sizes are available for the plugin I mentioned in comment #11, but it would be super nice if we could get that size as the "featured image" in the feed. If that exact size isn't available, we have several options for how to handle that between customizing the plugin, tweaking the homepage design if there's something close, finding a larger size and shrinking it to 460x150 as part of the feed processing on bedrock, or some combination.
I think we can have a little flexibility on the home page side of things when it comes to the image height. If the aspect ration doesn't match exactly for instance, we want to avoid the image being cropped in odd places. I think as long as we can get as close to this preferred size as possible, then we can probably do some CSS trickery with the image container to make it fit the design. Failing that, can always adjust the design a little if it's close enough.
I haven't seen the design of the open standard, but how confident are we that every single article is going to have a "hero" image that is at least close to that aspect ratio? Will it be a requirement for every published article? If not, we're going to need some generic category images for falling back if the article doesn't have one.
Attached image open-standard-home.png —
I've attached a screen grab of the Open Voices section that will be displayed on the home page for reference. I'm guessing if a given article does not contain an image, we will just have to omit it?
> I'm guessing if a given article does not contain an image, we will just have to omit it? By this I mean, just don't show an image (we will still show the article text, or course).
According to :bensternthal, the size of the image in the feed, *if there is an image*, is going to be 790x340. If images are absolutely essential to the design, we're definitely going to need category default images to handle the case where the article does not have an image. *If* we want to use images from the articles that have them, we're probably going to need to make the tweaks to the design to match the aspect ratio that :agibson mentioned in comment #15. The other option, which I like *much* better, would be to simply choose some images for the category of whatever size we want, and just always use those on the homepage and eliminate the image processing part of this task entirely.
(In reply to Alex Gibson [:agibson] from comment #18) > > I'm guessing if a given article does not contain an image, we will just have to omit it? > > By this I mean, just don't show an image (we will still show the article > text, or course). I would be perfectly happy to omit the image as well, but I understand that people are much more likely to pay attention to images, so I can see why the design calls for them. However, even though it's lower on the page than the firefox download button, it could still be draw attention away from it on larger screens, so we may want to consider launching with text-only, and then adding images later as an A/B test that looks at the CTR impact on both the articles and the download button on the homepage.
We need to launch with an image in the Open Standard section of the homepage. Gareth is already on board to closely monitor the impact of the new design on Fx downloads, and we will iterate if download rates decrease. I can ask Ty to look at the image ratio in the design. However, my preference would be to add an image size in the CMS that better matches the homepage requirements :)
OK here is what I propose. I will set the image size in the RSS feed to be 460px width with no height specified. 460 width is pretty close to what other folks have in their rss feeds (huff po etc). So it makes sense for consumers of the blog AND moz.org. We will only set the width to prevent skewing, we have max widths on the blog and guidelines for height but I can't guarantee the height wont be variable. If you need the height fixed.. i would suggest overflowing the image if taller. Smaller should not pose a problem for you.
(In reply to Ben (:bensternthal) from comment #22) > OK here is what I propose. > > I will set the image size in the RSS feed to be 460px width with no height > specified. 460 width is pretty close to what other folks have in their rss > feeds (huff po etc). So it makes sense for consumers of the blog AND moz.org. > > We will only set the width to prevent skewing, we have max widths on the > blog and guidelines for height but I can't guarantee the height wont be > variable. > > If you need the height fixed.. i would suggest overflowing the image if > taller. Smaller should not pose a problem for you. Thanks Ben, I think this sounds fine. The main consideration is that we don't serve home page visitors images that are far larger than we need, so as long as we can specify a width such as 460px and have guidelines for the image height, we should be able to incorporate then without adversely effecting the current design. Josh, fyi - the design only requires that we show the 4 most recent articles for each main OS category. I don't know whether it's worth factoring this into the feed parsing directly, or if we should handle this in the template. But I thought it might be worth highlighting here. Thanks
Feeds are available on dev. Note there is no content except for a single test post I created in the innovate category. Dev URLs For Feeds Are (prod will follow same pattern): https://openstandard.allizom.org/category/live/feed/ https://openstandard.allizom.org/category/learn/feed/ https://openstandard.allizom.org/category/innovate/feed/ https://openstandard.allizom.org/category/engage/feed/ https://openstandard.allizom.org/category/opinion/feed/ The "deck" will be populating the description field per comment #7, if a deck is not supplied the description is populated from the post body.
Thanks :bensternthal, that's exactly the examples I needed. Will the production image URL in the feed be on a CDN?
Flags: needinfo?(booboobenny+bugzilla)
As far as I can tell NO cdn is used to serve wordpress content. I asked for confirmation in #it but no response. I poked around on some other mozilla blogs and all the paths are the usual moz, I see no indication of a CDN being used.
Flags: needinfo?(booboobenny+bugzilla)
Confirmed in #it, no cdn currently.
(In reply to Ben (:bensternthal) from comment #27) > Confirmed in #it, no cdn currently. As you undoubtedly already know, there are several plugins available for using a CDN with wordpress; I think we should consider using one, since it would benefit both the open standard and the mozilla.org home page.
Seems like a good idea to me. This would be a devops task as it would be for ALL blogs not just ours. Bug 1075289 filed. I don't think we should bank on this for launch. What's your caching strategy for this content? Would it be possible to cache the image on the moz.org side and leverage that infrastructure either zeus or cdn?
(In reply to Ben (:bensternthal) from comment #29) > Seems like a good idea to me. > > This would be a devops task as it would be for ALL blogs not just ours. > > Bug 1075289 filed. > > I don't think we should bank on this for launch. > > What's your caching strategy for this content? Would it be possible to cache > the image on the moz.org side and leverage that infrastructure either zeus > or cdn? https://wordpress.org/plugins/w3-total-cache/ supports CDN configuration on a per-site basis. If we could get that installed and configured for at least the open standard site, then that would obviously be preferable, but if necessary then yes, we can pull the images over to the bedrock servers and use the same CDN configuration as for the rest of the mozilla.org site.
Based on comment bug 1075289 -- I would say cache on moz.org. CDN setup on blogs does not sound likely in the next week or so and we do not want the moz HP to bring down all the blogs!
(In reply to Ben (:bensternthal) from comment #31) > Based on comment bug 1075289 -- I would say cache on moz.org. CDN setup on > blogs does not sound likely in the next week or so and we do not want the > moz HP to bring down all the blogs! Agreed, will do.
Verified feed displays on /en-US, all 5 article topic categories display & update correctly, displays well in maximized or narrow browsers.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Marking as verified
Status: RESOLVED → VERIFIED
Commit pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/1e2055c25f3e306f631c1438d55353a74f3c6f9c Fix bug 1055612: parse open standard rss Add articles parsed from rss to new homepage Update tweets and open standard rss during deploy
Status: VERIFIED → RESOLVED
Closed: 12 years ago → 11 years ago
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: