GUADEC 2017

I attended my first GUADEC this year, held in beautiful city of Manchester. I am in general not very enthusiastic about social meetings but GUADEC was something I always wished to attend and I am glad I did.

The Conference Days:

The first day started with talks about GNOME and different applications and ended with lightning talks from interns and newcomers. I was a bit nervous about presenting in front of so many people, mainly because I am not very good with presentations but everyone was extremely nice and  encouraged me before the talk and this made it much more easier task. I am glad I had this opportunity and I hope that I improve with my presentations from here on.

I liked hearing people talk about GNOME softwares and being a newcomer it was nice way to get to know more about the projects. I attended most of the talks and liked all of them but I would like to specially mention some of them:

  1. Status of Builder – I use builder for all my development work hence I really appreciate the work of Christian and I loved the demonstration.
  2. The History of GNOME – I got to know so many knew things and how GNOME progressed as a project.
  3. How to get better milage out of Glade – I am glad that there is work going on to improve Glade, since this is one application I would love to use more.

The rest of conference was meeting new people and talking about things related to my project or GNOME and even Non GNOME stuffs in general. I also had chance to meet my mentor feaneron and personally thank him for all the things he has helped me with and helping me become a contributor from a complete newbie.

Unconference Days: 

So Unconference Days was scheduled with workshops at the start of day and ended with social event. I tried to utilize the time to work on my GSoC project and get some reviews and help from my mentor. I also attended the later half of the Builder workshop and liked it. Ah! I should have attended more Workshops/BOFs.

Trek and City Tour:

City Tour was cancelled on Friday due to rain but thankfully that didn’t happen on Sunday. Pic from the tour. More can be found here .IMG_20170730_193530

I went on a trek for the first time in my life and it was a really nice experience. I would like to thank the team for planning the Trek and also our Group Leader Allan Day.

DSCF4564

Acknowledgement

I would like to thank GNOME Foundation for sponsoring me. I also thank the team for planning everything and working so hard to make the conference a success and memorable 🙂 Thank You GNOME!

sponsored-badge-simple

Update: Todoist Integration

In the last blog post, I gave a brief idea as to how Todoist plugin is structured to work and I talked about my work related to loading Todoist tasks inside GNOME To Do. After modifying the previous work and making some improvements, the code has finally been pushed to master. I also worked on implementing functions that will save any changes made to Todoist tasks or lists. The Todoist Api allows applications to send an HTTP Post requests for adding/deleting tasks/lists. To Do makes uses of the Todoist Api v7 and sends HTTP response for fetching and storing the changes.

static void
gtd_provider_todoist_remove_task (GtdProvider *provider,
                                  GtdTask *task)
{
 GtdProviderTodoist *self;
 JsonObject *params;
 g_autofree gchar *command;
 g_autofree gchar *command_uuid;

 self = GTD_PROVIDER_TODOIST (provider);
 command = command_uuid = NULL;

if (!self->access_token)
 {
  emit_access_token_error ();
  return;
 }

 params = json_object_new ();

 command_uuid = g_uuid_string_random ();
 command = g_strdup_printf ("[{\"type\": \"item_delete\", \"uuid\": \"%s\", "
                            "\"args\": {\"ids\": [%s]}}]",
                            command_uuid,
                            gtd_object_get_uid (GTD_OBJECT (task)));

 json_object_set_string_member (params, "token", self->access_token);
 json_object_set_string_member (params, "commands", command);

 post (params, (RestProxyCallAsyncCallback) post_generic_cb, self);
}

The above snippet is to remove a task-list. Other function that work as editing the changes to Todoist, have similar implementation. They send param such as “token” and “command” and make use of post method to send an HTTP Post request. The post method use librest to make a call to Todoist sync endpoint.

What has been completed?

  1. GNOME To Do can load Todoist tasks and lists. So now, users can view their Todoist tasks inside To Do.
  2. Not just view, but one can also modify the tasks and lists and these changes will get saved to user Todoist account.
  3. Deleting tasks and list is also possible now. Although, deleting list won’t work because of a bug in GOA which doesn’t provide correct access rights to Todoist Account.

What is to be done?

  1. We cannot create a todoist task or list from GNOME To Do currently. This will be covered by next week.
  2. To Do cannot sync tasks and lists from Todoist automatically. This is currently in progress and hopefully will be completed by next 2 weeks.
  3. After completing the above tasks, I will work on limiting the number of post requests made by To Do so that we do not exceed the Todoist limit of 50 per minute.

A small video demonstrating the above Changes:

Do checkout the work and feel free to open bugs on bugzilla if you encounter them . Any suggestion for improvement is most welcomed. Don’t forget to drop a mail if you have Todoist specific features suggestions i.e Productivity Graph that can be implemented in GNOME To Do.

GSOC : Post Phase 1 Update

The first phase of my GSoC project has completed. I received an evaluation on my work from my mentor, feaneron. I am happy that the project is moving well. I hope to keep up with the work and continue this awesome journey and learn in the process.

So, let me come back to the project update. We have come a long way and I am happy to tell everyone that To Do can now load Todoist task lists and tasks. Although this work is still in progress and patch related to this change will be pushed probably by this week. So everyone waiting to use Todoist with To Do keep a watch on To Do repo for the update.

The major problem that I faced was synchronizing the tasks and task lists so that they are updated automatically. After discussion with my mentor, we have decided to sync tasks every hour, although this may change. I wanted the sync calls and functions updating the changes to be separate so that there is less friction between the code.

The current flow of Todoist plugin is:

Todoist Plugin WorkFlow (1).jpg

All the phases shown in the flowchart, except the last part which is synchronizing the tasks, has been completed. The major problem with task synchronization is code repetition due to addition of update functions. After some thinking I decided to make the function that initially loads tasks to be good enough so that it can be also be used to update tasks. To achieve this I had to add a check if lists/tasks already exists using the id. So if suppose the list already exists, I just fetch the list from Hash Table using the id as key and make changes to it’s properties. This way the list gets updated and not created again if it already exists. The problem that still exists is with the “list-changed” signal which is not behaving as thought and I need to fix this.

I have a short video demonstration for the work in progress.

Feel free to drop suggestions and give your feedback.

Todoist Preferences Panel for To Do

A lot has happened in the first two weeks of coding period and i am excited to share it with everyone. So, for the first two weekend I worked on adding a Preferences Panel that allows users to add/modify Todoist account that they want to use with To Do. Earlier we had planned to make it work in sandboxed environment, but upon mclasen’s suggestion we are sticking with getting the Goa Portal and Todoist account addition to work on non-sandboxed environment first.

So here’s how the Todoist Preferences Panel has turned out and it’s looking really cool :

out.gif

Since Todoist provider is not yet merged with GOA, we don’t have a todoist account to test with, in which case To Do shows a no accounts page and asks if you wish to add one. Mind you the add button will be invisible if there is todoist provider in your GOA but i have enabled it just for demo.

Incase you have a Todoist Account in GOA added, your preferences panel would this along with todoist accounts in the ListBox. I need to make some changes to preferences including the icon which would done in a later stage.

Screenshot from 2017-06-16 18-41-32

I have also progressed on adding some required functions to GOA and the patches have undergone a few review iterations and we can can expect them to be pushed to master before end of next week.

What additions are in line for GOA?

  1. ListProviders: We can now make a DBus call to GOA and get a list of supported providers. This can be useful if apps want to query if GOA supports a specific provider. To Do will make use of it to decide whether to show a Add Account button or not.
  2. AddAccountForProviders: This is yet another DBus method that takes in a string “provider_type” and spawn the Control Center to allow addition of an account, which apps can make use of.
  3. Todoist Provider: This is being added by Recipe members and with this GOA will support Todoist accounts which To Do, Recipe etc. can use.

All the patches related to GOA are in progress and not pushed to master branch, if you wish to check these out, patches have been uploaded here.

A short video demonstrating these changes :

I am using D-feet to trigger the Dbus calls. As you saw in last video, the AddAccountForProvider method is already being used by To Do.

out1

This is all I had for this blogpost, I will keep updating the changes as it occurs. Feel free to drop suggestions. They are always welcomed 🙂

GSOC with GNOME : To Do

I am really happy and excited to be accepted as Google Summer of Code Student by GNOME and i will be working on integrating Todoist to GNOME To Do. Todoist is a widely used and popular Online Task Manager App. To be honest, this wouldn’t have been possible without the support I received from people in GNOME and especially my mentor feaneron who answered my every single query, even the silliest of them ( I am sorry Georges :P). I am really excited to be a part of such an helpful and knowledgeable group of people and hope to make best of this opportunity and learn lot of new things 🙂

Planning and Future of Todoist Plugin

We are collaborating with GNOME Recipe, Outreachy Project, since the project also requires Todoist integration and the work related to adding a Todoist Provider in Gnome Online Accounts (GOA) will be shared .We have held two meetings with my mentor (feaneron) and GOA maintainer(rishi) along with Recipe team (mclasen and ekta) and have started to finally build a plan as to how things would work out.We still have one meeting scheduled to finalize the whole thing.

Till now this is how things have shaped:

  1. Introduce a Todoist Provider in GOA –  Since Gnome To Do and Recipe are not core apps, it is possible that user may not be using these application in which case the Todoist provider will be left useless. So we decided to have a Todoist Provider which will only be shown in case there is an app that uses.We would be adding a AddAccount function in libgoa that To Do and Recipe can use to interact over dbus with GOA and a ListAccount that can be used to list all accounts including the hidden Todoist accounts.Then it works normally like any other provider allowing user authorization and saving access token.
  2. Implementation details in To Do – 
    • Preferences Panel – This will allow user to select an already added Todoist Account or set-up a new account that will make use of the ListAccount and AddAccount method introduced in previous step.
    • This is how a Preference Panel looks like. We will have something similar showing list of Todoist Account in a List Box and allowing user to add more accounts.Screenshot from 2017-05-22 21-20-50
    • TodoistPlugin – The plugin is medium between the provider and To Do which helps in maintaining the providers , adding , removing them.
    • TodoistProvider – A Todoist Provider is basically a TodoistAccount (as added by user) along with method that will fetch task ,tasklists and other information from the Todoist Server and also methods to update local changes to Todoist. Currently Todoist supports some cool features that are not supported by To Do but our focus in the project is not to integrate all those features, but a solid Todoist Plugin that does every basic task that To Do supports and ofcourse we will look to expand the features as time permits 🙂

So this is how the plugin is designed in To Do.We have one more meeting after which things would be even more clear. I have asked feaneron for a Q/A Session to discuss more about the plugin and i am sure we can improve our plan and execute it to perfection. Sorry for not having any demo photos at the moment but I promise to keep them posted here as Project continues 🙂

Feel free to drop suggestion.

Some notes from our meeting Click Here.

Project Wiki Page.

Introduction

Hello World,

This is my development blog where I will be posting about the work related to my open source projects as I progress through them and also every movement related to my GSOC project (upcoming next post related to my project) will be updated on this blog.

There are a lot of development blogs already, but I believe every developer has his own unique experiences to share and it will not just be learning  for readers but myself included.

A Short bio

I am Rohit Kaushik, a Computer Science Undergraduate at BITS Pilani, Goa Campus . I have deep interest in the Computer Science and I love programming. Apart from being a user of Open Source Applications, i am also a contributor at GNOME.My contribution have been majorly to Gnome To Do and Nautilus. Beside my love for Computers, I like listening to music and I also plan on learning to play keyboard this summer :).

You can check my projects at github and contact me here.