Integrate Stack Overflow discussions and search on MDN Developer Program page

RESOLVED FIXED

Status

Mozilla Developer Network
General
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: Robert Nyman, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
We want to be able to display discussions from Stack Overflow, and make them searchable, as part of the Developer Program page on MDN. This should be accomplished via http://api.stackoverflow.com/
(Reporter)

Updated

4 years ago
Blocks: 932711
(Reporter)

Updated

4 years ago
Blocks: 918127
Starting to look into this. 

What would really help are some more details on exactly what a display of discussions from Stack Overflow looks like. Mockups would be great. That would suggest what data would be required to populate the display. 

Guessing at what we might need, I don't think the Stack Overflow API actually offers anything interesting to list discussions. Instead, the Atom feed from our /r/mozilla page looks promising:

    http://stackoverflow.com/feeds/tag?tagnames=firefox+or+firefox-os+or+html5-apps&sort=newest

I'm working on bug 765642 as a way to enable KumaScript to fetch & use feed data in wiki pages. If the above feed looks like it has what we need, we can use KumaScript to massage the data into an embedded display on the page.

There *does* seem to be API for search. But, I think it would make more sense to point a form at Stack Overflow's own search pages, rather than try to build our own views that just re-frame Stack Overflow data.
(Reporter)

Comment 2

4 years ago
> What would really help are some more details on exactly what a display of
> discussions from Stack Overflow looks like. Mockups would be great. That
> would suggest what data would be required to populate the display. 

I did a quick mockup for the landing page in bug 918127, this is the attachment: https://bug918127.bugzilla.mozilla.org/attachment.cgi?id=828254

In general, what I'd like to be presented is a heading, search field for our sponsored tags and a list of the latest discussions (5-10).
 
> Guessing at what we might need, I don't think the Stack Overflow API
> actually offers anything interesting to list discussions. Instead, the Atom
> feed from our /r/mozilla page looks promising:
> 
>    
> http://stackoverflow.com/feeds/tag?tagnames=firefox+or+firefox-os+or+html5-
> apps&sort=newest
> 
> I'm working on bug 765642 as a way to enable KumaScript to fetch & use feed
> data in wiki pages. If the above feed looks like it has what we need, we can
> use KumaScript to massage the data into an embedded display on the page.

A feed might be just fine. Looking at their API (http://api.stackoverflow.com/1.0/usage), though, wouldn't the /questions or /tags methods be suitable for this? 


> There *does* seem to be API for search. But, I think it would make more
> sense to point a form at Stack Overflow's own search pages, rather than try
> to build our own views that just re-frame Stack Overflow data.

Preferably would be to use the search field in the the landing page on MDN, do a search, and replace the listing of the latest questions with ones matching the query (and a small subheading changing to 'searches matching "Firefox OS camera access"' or similar).

Sending them off to Stack Overflow's search result pages work, but I'd rather keep the users in the MDN context slightly longer, and then send them off when they have chosen a certain question to go to.
The most recent five topics matching the tags "firefox" "firefox-os" and "html5-apps" are now listed on the MDP page, and the search box is there. Search is currently heading people off to SO's results page; we will investigate keeping them on MDN as a follow-up unless that's a big enough deal to warrant tackling it right now rather than pursuing other things that we'd like to do before launch of the redesign.

If we're good with updating the search after redesign launch, I propose filing a new bug for that and closing this one out.
Flags: needinfo?(robert)
(Reporter)

Comment 4

4 years ago
(In reply to Eric Shepherd [:sheppy] from comment #3)
> The most recent five topics matching the tags "firefox" "firefox-os" and
> "html5-apps" are now listed on the MDP page, and the search box is there.
> Search is currently heading people off to SO's results page; we will
> investigate keeping them on MDN as a follow-up unless that's a big enough
> deal to warrant tackling it right now rather than pursuing other things that
> we'd like to do before launch of the redesign.

Sounds great! It's crashing for me right now, but I guess that will be solved soon.

> If we're good with updating the search after redesign launch, I propose
> filing a new bug for that and closing this one out.

Can we wait a day or two and just see how it goes before we do that? I do agree that sounds like a good plan B, though!

One more small thing: we can't call our engagement at Stack Overflow for forums, it needs to be called Q&A.
Flags: needinfo?(robert)
The renaming "Forums" -> "Q&A" has been fixed.

The errors we're having on the MDP page right now are a server back-end problem affecting all macros on the site; I assume we'll have that fixed in the morning sometime.
Created attachment 8342469 [details]
mdp_so_dupes.png

Just FYI, I'm seeing dupes of SO questions. I tried to look at https://developer.mozilla.org/en-US/docs/Template:DevProgramListSOTopics myself but didn't see anything immediately obvious.
(In reply to Luke Crouch [:groovecoder] from comment #6)
> Created attachment 8342469 [details]
> mdp_so_dupes.png
> 
> Just FYI, I'm seeing dupes of SO questions. I tried to look at
> https://developer.mozilla.org/en-US/docs/Template:DevProgramListSOTopics
> myself but didn't see anything immediately obvious.

We're querying 3 tags, and the same question can appear under each. The code probably needs to de-dupe.
De-duplication has been done now, and the output looks great.

Can we close this at this point? We can do a follow-up bug to add support for showing the results in-MDN if that's something we want to look at.
I'm going to resolve this as fixed for now, with the expectation that we will be going live with this section of the MDP homepage on Monday Dec. 9th.  If the Stack Overflow feed needs more work, please file follow-up bugs.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Reporter)

Comment 10

4 years ago
Sounds fair. I'll file potential follow-up bugs later.
Moving to General component.
Component: Developer Program → General
You need to log in before you can comment on or make changes to this bug.