Tuesday 27 May 2014

GSoC Update - Week 1 Work


Just a week to go before the coding period started and I, out of nowhere, contracted typhoid and got hospitalized for 8 days. Luckily not much damage was done and just a couple of days into the week, I was discharged from the hospital. I had already informed my mentor Roger Haase about the delay in work and he was understanding enough to give me more time to start work and asked me to buck up for work ahead. Finally I looked at the plan for the week and started work.

The first issue in light was the issue #73. The sidebar was becoming too large in the Basic theme. The reason being the padding in the cells - the Home button, History, Index, User Actions, etc was 10px, which is quite high. It seemed as though one could fit the text three times in the same button :) . After reducing the padding the sidebar got smaller and looked better fitted. Another thing I did was to make the User Actions, View Options and Item Actions menu expandable. This made the sidebar much smaller and cleaner. The user can click on the '+' button to expand or collapse the menu. Here you can see the code review and commit.


A screenshot of the changed sidebar

The second issue pointed out to me was that the word settings was getting repeated too many times in the 'User Settings' menu in the menu bar. This caused problems in translated versions as for example in German the word 'Settings' translates to 'Einstellungen' which is quite long. As a result the menu bar breaks down and turns multiline. So I removed unnecessary repetition. Here you can find the code review and pull request.

Finally the main issue in focus - The Quicklinks in the Basic Theme. The quicklinks as I had mentioned in an earlier blog were exceeding their divs and as a result the remove button 'X' was also not working. I had also mentioned that it was being caused due to the quicklinks being only shortened to the default size of 25 characters whereas for divs in the Basic theme the ideal maximum size of a quicklink would be 15 characters. So I changed the code in the function call to the shortening function - "shorten_item_name" and passed in 15 as argument. Now another problem that was there was that the quicklink tooltip, which comes up on a mouseover, only showed the current wikiname and nothing about the item itself. So if I have a wiki named "MyMoinmoin", all quicklink's tooltips showed "MyMoinmoin" on a mouseover. We had a discussion regarding the solution to this in the weekly meeting on Saturday. We came to the conclusion that the format "<wikiname> : <itemname>" would be good enough as of now. So I changed the layout.html for basic and modernized themes to reflect the same. It is currently up for review. Here is how it looks like now.



Sunday 18 May 2014

GSoC Update - Plan for Week 1

The main aim for this week is to improve quicklinks. Currently although the quicklinks do get shortened, but in the basic theme they overflow the div and as such the remove link button 'X' also does not function. Shortening of links is handled by the "shorten_item_name" function in "Moinmoin/themes/__init__.py".
Here is a link to the Code. The currently the default maximum size of a quicklink is set to 25, by the variable "length". But the quicklink div in the basic theme can ideally accommodate maximum of only about 15-18 characters. So the default maximum needs to be brought down. Also the expansion button in modernized theme for the quicklinks needs css fix is it not quite visible.
Another task is to fix the issue #72 and #73 in sharky93's issue tracker. According to #72 the content needs to be rendered before the sidebar as when the resolution is low, the theme breaks down and the sidebar gets displayed on top and the content below it. This is a bad situation as the content is more important than the navigation. Rendering the content before the sidebar would ensure that the content gets displayed on top. According to #73 the sidebar is too tall. We need to scroll down the page in order to get to the bottom.

Not to forget I'll be doing the documentation related to all my work. :)

Sunday 11 May 2014

CSE 123 – Intro to FOSS



It was summer of 2013 when I saw all kinds of Facebook statuses of my seniors stating selection in GSoC along with Quora posts. That’s where I first heard about GSoC and more so it was my first actual look at the working of FOSS. In schools they teach about open source software but that’s just the definitions, nothing about how it actually works. I started looking at how open source works. I started learning about the version control system. In the beginning it all seemed too big to handle. So much so that for a month I just kept looking at organizations to start working. I would read the “Getting Started” guide for each of them and then would find myself stuck when it came to actually starting with work. I just looked at bugs and the descriptions of each – even the beginner ones - looked quite scary. Each time I looked at a bug I thought it’s too difficult for me. But till that time I hadn't gone to the IRC of any organizations (which I realized was my biggest mistake). Finally one day I set up and went online on the IRC of Mozilla. The developers welcomed me and helped me get started off. One of the developers was a mentor for a beginner bug and he asked me if I was interested in working with him. And here I was solving my first bug. That was the moment when I realized what an important tool the IRC was. The bug when I started working and asking my mentor, turned out to be a very minor problem. All these days I had been staring at them from the outside – all of them looking so difficult and literally scary and here I was working my easily through the first bug. I’d recommended anyone whose reading this blog and aspiring to be contribute to open source – “PLEASE JOIN THE IRC”. So in a week I had solved my first bug and it had been merged into the main repository. Delighted I was, seeing the mail congratulating me for solving my first bug. Then suddenly came in my end semester exams and I had to stop all activities except for my academic work. And sadly this continued in the winter holidays too.

GSoC 2014

The long wait ended on 21st April when the GSoC candidate selection results were announced. My heartbeat had been steadily rising all evening as the result time came closer and closer. Butterflies flying around in the stomach. An air of excitement filled the atmosphere. Many of classmates had applied and were themselves anxiously waiting for the results too. Although I was quite nervous, in a corner of my heart I was sure of my selection. I had put in quite a lot of effort in showing my potential by fixing bugs for MoinMoinWiki and also put in a lot of effort into my application. But then you can never be sure can you? ;)

Finally it was 12:30PM and people started getting acceptance mails from Carols and their organisations. Everyone started rejoicing and sounds of people congratulating each other filled the atmosphere. But I started to get a bit nervous as my acceptance mail had yet not come. Then my competitor and classmate Saurabh Kathpalia rejoiced on receiving his acceptance mail from PSF (MoinMoinWiki). I got more nervous. I logged onto melange as people said that they had released the list of selected candidates. I couldn't find my name in the list. I was in despair for a moment before I realized it was not the complete list as Saurabh's name was not there too. Then a bit scared a bit hopeful I started continuously refreshing my Gmail in hope to receive my acceptance mail. After a couple of minutes, just as I was losing hope, there it was -
Dear Ajitesh Gupta(:randomax),
Congratulations. Your proposal "Improving MoinMoin 2.0 GUI" submitted to Python Software Foundation has been accepted for Google Summer of Code 2014. 
I was ecstatic. I screamed with a sense of achievement at the top of my voice as my friends hugged me. It was a feeling which words cannot describe. It was one of the biggest achievements of my life. Meanwhile it was pandemonium in the corridor as the 5 people living my corridor of 26 people who had applied - all of them had been selected. There was an end semester exam the next morning but it was the least of anybody's worry - everyone was too busy celebrating the moment. Finally the celebration settled after a juice party and everybody got back to studying. I in the meanwhile called up my parents and informed them about the selection and they too were very happy though they were a bit more concerned about my exam the next day :D

So yes I have been selected to work for MoinMoinWiki under Python Software Foundation for GSoC 2014!! I'll be improving the Moin2.0 GUI.