Social Help for Sugar: Week 3

Third week is gone and another few things have been done. Also, this post comes a bit late – sorry about that. Next one will be on time.

Now, getting on with things. This week began with a discussion on sugar-devel whether I should use a webservice interface with social-help. The discussion clarified to me what is a webservice used for; social-help not being a likely candidate for usage. So, I’ve decided that creating a webservice interface isn’t necessary – the social-help activity handles user sessions quite nicely.

Then, I tried injecting some javascript into the Discourse webpage via WebKit – just a couple of alerts – and they work just fine. This I did because I wanted to autofill the username field of the registration form. I tried doing this using jquery based events. That didn’t work – I have no idea why. The JS console shows no errors or warnings. I can speculate however. I suspect that the code doesn’t work because the Discourse website is entirely ‘web 2.0’ – it’s all ajax. The whole thing is built on top of ember.js and the whole of it is loaded in realtime. That means that the elements that I wish to select via the jquery selector isn’t even there most of the time. So, I suppose this thing might not work despite the best of intentions. I will give it another shot later on.

In the last post, I mentioned that I had a few doubts about how to handle the login sessions for multiple users. The simple solution was to have a Gmail like popup on the top which disappears on its own in a few seconds. This popup shows displays the name of the currently logged in user and prompts you to logout. I actually do not know Ruby on Rails at all. To this end, I asked the discourse devs about how to go on adding this popup. Well, that question didn’t bear fruit – I was given a link of an existing Discourse extension and told that I should make an extension to display the popups. Ah well. I had to study ROR for some time to get how things worked. Anyway, that works now. Maybe, I’ll make a Discourse extension of this. Maybe.

Anyway, I also tried another colour scheme – one that doesn’t use the standard OLPC color palette. I think this one’s a bit better. Also, Paul sent me a couple of screenshots of Discourse on an XO so that I’ll the the font size adjusted according to the high DPI screen on the XO.

This next week, I’m going to finish up with the new colour scheme and I’ll start stripping the browser of unnecessary things.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s