UCOSP Spring 2012/Standups/10 Feb

From MediaWiki.org
Jump to navigation Jump to search
<Amgine> ===== Begin logging =====
<pfhayes>	 sheaclare Amgine, ready to go
<Amgine>	 Sheaclare, you first.
<sheaclare>	 Ok. 
<sheaclare>	 I've been working on the copy link/definition to the clipboard functionality, since it looks like "share" has already been implemented.
<pfhayes>	 dale implemented that
* Amgine has changed the topic to: Standups! Will be logged to https://www.mediawiki.org/wiki/UCOSP_Spring_2012/Standups/10_Feb
<pfhayes>	 do you know if he contributed it back to wikipediamobile?
<sheaclare>	 Dale implemented which one? the "Share" part of the "copy to clipboard" part?
<pfhayes>	 the part where you can select a word in an external app, and 'look up in wiktionary'
<pfhayes>	 sorry, that might be unrelated to what you mean
<sheaclare>	 yeah, that's kind of the inverse of what I've been working on
<Amgine>	 The 'share' part Dale was goin to be working on was to send the url to other apps.
<pfhayes>	 i see
<Amgine>	 (for example, an e-mail app, a text message app, etc.)
<Amgine>	 Sheaclare is working on the "copy word/definition to clipboard" part, which is not as easy as we first hoped.
<sheaclare>	 i think the result of our conversation tuesday was dale was going to work with me on the "share" functionality, and perhaps one of us would split off and tackle the "copy-to-clipbard" (for use in other apps) independantly
<Amgine>	 Okay.
<sheaclare>	 However, as I mentioned, it looks like "Share" is already implemented, so I've been working on the second one: copy to clipboard
<sheaclare>	 … what Amgine said
<pfhayes>	 cool
<sheaclare>	 so again, just like Amgine said, the copy-to-clipboard (C2C) has turned out to be more involved bringing in a phone gap plugin
<sheaclare>	 It works in the emulator, but fails on a real phone
<pfhayes>	 i see
<Amgine>	 I was just told there is a plugin for iOS, sheaclare.
<Amgine>	 <Amgine> Question: What is the best method for copying to clipboard within phonegap?
<Amgine>	 <maxogden> on iOS there is a plugin
<Amgine>	 * chrgot (~chrgot@p5DDE1D0C.dip.t-dialin.net) has joined #phonegap
<Amgine>	 <Amgine> plugin within phonegap?
<Amgine>	 <maxogden> in the phonegap-plugins repository
<Amgine>	 <Amgine> Cool! <looks>
<pfhayes>	 if it's difficult to implement in phonegap, does it make sense to implement it as android specific?
<sheaclare>	 Yeah, it looks fairly straightforward to do it in Java
<pfhayes>	 if it's difficult to get working with plugins, etc., then you might want to do that
<sheaclare>	 I think that might be a pretty good idea, since the plugin itself requires an extra Java class, so either way we're modifying more than just the Javascript
<sheaclare>	 So that's one thing.
<Amgine>	 <nods> There is plugin ClipboardManager for android, and plugin ClipboardPlugin for phonegap, but rolling our own may be the best solution.
<Amgine>	 Perhaps we should ask if the wp app is using a certain method?
<sheaclare>	 Right, I've been trying the ClipboardManager for Android
<sheaclare>	 Good idea. 
<sheaclare>	 Maybe I can do that later after stand ups are over?
<Amgine>	 Sure.
<sheaclare>	 So I have one other challenge I've been thinking about.
<sheaclare>	 That's how to grab the word of the day itself, and its definition from the HTML on the page.
<sheaclare>	 I was thinking that one way might be to modify the page to have one or two hidden elements with attributes set to the word of the day and its def.
<pfhayes>	 if you do that, you'll still have to be parsing the html to extract the word anyway, right?
<sheaclare>	 Wouldn't I just be able to go "document.getElementById('hiddenDefinition').word_of_day_str;" for the word of the day, and then  "document.getElementById('hiddenDefinition').definition_str;" for its definition?
<pfhayes>	 yes - but at what level are you suggesting adding the hidden div? server level, or generating this div on the phone?
<sheaclare>	 server level.
<pfhayes>	 if you are generating on the phone, you'll still have to find it anyway to make the div. and i don't know if you'll be able to convince them to add that on the server
<pfhayes>	 Amgine?
<Amgine>	 Sorry, just a sec.
<pfhayes>	 i would say your best bet is to parse the response and pluck out the word/definition
<pfhayes>	 or is there some reason why that is not feasible?
<sheaclare>	 That sounds like a pretty good idea, but how can I get the raw HTML from Javascript?
<sheaclare>	 I thought I only had access to 'document'
<Amgine>	 The best way to do it at the server level is actually to do it in the template. It would be *safer* to do it in the app as pfhayes suggests.
<pfhayes>	 if you look at the code, what they're doing is getting the html for the mobile page, and inserting it inside a div
<sheaclare>	 Can you tell me where that is?
<pfhayes>	 let me check
<sheaclare>	 thanks
<pfhayes>	 the div they put it in has the id 'main'
<pfhayes>	 i mean, 'content'
<pfhayes>	 look at 'renderHtml' in js/chrome.js
<sheaclare>	 <checking>
<pfhayes>	 which is called from 'loadPage' in js/app.js
<pfhayes>	 what they do is get the html from the server, and just place it in the content div
<pfhayes>	 they muck around with it a little bit too
<Amgine>	 You're looking for a span id=WOTD-rss-title, and a div id=WOTD-rss-description
<pfhayes>	 so what you'll want to do is, wherever you stick the code to extract the word/definition, use jQuery to traverse the html inside the content div to pull it out
<Amgine>	 The description is the definition plus some formatting.
<sheaclare>	 Ok cool.
<sheaclare>	 For now I'll make it a menu option, but It might be more intuitive for the user to have it as a small button to the right of the word of the day - actually in the page
<pfhayes>	 sheaclare: don't we want this for all pages, not just word of the day?
<Amgine>	 *that* will be much more difficult to parse.
<pfhayes>	 well, getting the actual word should be easy
<Amgine>	 <nods>
<pfhayes>	 grabbing the definition, we can just use the first section that's open?
<Amgine>	 I think definitions are always <ol><li>
<sheaclare>	 pfhayes: you're right, i mean "word", not "word of the day"
<pfhayes>	 okay
<pfhayes>	 because i figure this is a feature that users won't just want for one page
<Amgine>	 Oh... I was looking only at wotd.
<pfhayes>	 i would say it should be a menu button, so they can access it from anywhere in the page
<Amgine>	 Let me find the right tag for a normal definition page.
<Amgine>	 <h1 id="firstHeading" class="firstHeading">word</h1>
<Amgine>	 So, h1 tag, id=firstHeading
<pfhayes>	 sheaclare: does that work for you?
<sheaclare>	 If it's not a solution itself, then it's at least a start!
<sheaclare>	 I think the balance of my time will be spent on figuring out how to get this HTML using jquery. I can look into that in my own time. 
<sheaclare>	 So I think that's it for me.
<pfhayes>	 cool
<Amgine>	 You're up then, pfhayes.
<pfhayes>	 i have been mostly working on maintaining the repo
<pfhayes>	 i did a big rebase the other day - sheaclare, were you able to pull and resolve your conflicts?
<Amgine>	 <more coffee, brb>
<sheaclare>	 I think I know what you're talking about. I just got your email offering to assist me with my git issues, as Amgine described them. The thing is, I don't remember complaining about any issues to him
<sheaclare>	 I did a fetch/merge a few days ago - maybe before, maybe after the rebase - but right now things are ok.
<sheaclare>	 I'll do another while we meet in case it creates problems
<pfhayes>	 okay
<pfhayes>	 i also messaged tfinc to get the repo moved - once that happens, i will work on migrating the repository and letting everyone know how it goes
<pfhayes>	 i also talked to Amgine about what to work on next; looks like i'm going to start contributing upstream to wikipediamobile
<pfhayes>	 haven't decided on what yet, though
<Amgine>	 You didn't have any problems, just that it looked like it was the before rebase version.
<pfhayes>	 i will try to make sure they are features relevant/desired for wiktionary, though
<pfhayes>	 that's about it for me
<sheaclare>	 Amgine: Ohhhhh you mean when you saw my project in Eclipse last night, it looked like I hadn't pulled the rebase yet?
<Amgine>	 <nods>
<Amgine>	 Okay, my turn. I fumbled on the blog, Shea saved our bacon with a quick right up which I sent out yesterday morning.
<pfhayes>	 thanks sheaclare
<sheaclare>	 No prob! :)
<Amgine>	 We have all been cordially invited to the Wikimedia Hackathon at Wikimania, in Washington DC.
<Amgine>	 That's in July.
<pfhayes>	 oh cool
<Amgine>	 And they do have some scholarships available to help with costs, if you apply very quickly.
<Amgine>	 Let me get that url...
<Amgine>	 https://wikimania2012.wikimedia.org/wiki/Hackathon
<Amgine>	 https://wikimania2012.wikimedia.org/wiki/Scholarships
<Amgine>	 Scholarships deadline is Feb 16: 6 days! If you want to try to get support, do it quickly.
<Amgine>		There is also very fast planning happening for a hackathon in Berlin, early June. I don't have details for that event yet, but I will keep you informed as I learn more.
<Amgine>	 (I have doubts about scholarships for that one)
<Amgine>	 And I noticed even sketchier details about a possible mobile dev event here : https://www.mediawiki.org/wiki/MediaWiki_developer_meetings#2012
<Amgine>	 tentatively marked for Brazil.
<sheaclare>	 Nice - thanks Amgine!
<Amgine>	 So, is there anything else we should talk about for this mtg?
<sheaclare>	 Nope. Just did a pull from the upstream repo and things went smoothly
<pfhayes>	 that's good sheaclare
<pfhayes>	 i am applying for the scholarship as we speak
<sheaclare>	 pfhayes: nice!
<Amgine>	 I know several people on the committee(s), so tell me if you apply so I can comment to them about the team members.
<pfhayes>	 i just applied
<Amgine>	 Not sure if that will have any effect, but I can try!
<pfhayes>	 thanks Amgine
<Amgine>	 yw.
<pfhayes>	 anything else?
<Amgine>	 Shea: the scholarship does include travel and housing in the hostel, leaving you on your own for incidentals, small costs (taxis, etc.)
<Amgine>	 Not from me. Looks like we're caught up?
<pfhayes>	 sounds good
<pfhayes>	 sheaclare, anything else?
<sheaclare>	 nothing from me!