This is my update of the work I did during the last week.
Basically it was a pretty intensive week. Not only was it time of midterm evaluations and we were expected to show 'a working demo', but also we were integrating the statistic dashboard page with Python backend which was not a piece of cake for me, as it required a lot of JavaScript/jQuery work.
Let me describe shortly what was achieved in this area. Before that week the statistic dashboard page had already some functionalities: users could create new widgets, but they could only move them. After the page was reloaded, they always appeared in the third column in random order. The first feature that I added was an option to collapse widgets so that the user could shrink the ones which he or she did not need.
Here is an example of standard widget:
And here you can see how the widget looks when it is collapsed.
As you may also notice, the widgets below are moved upwards.
The second thing was to allow users to remove widgets from their dashboards. One may not want to have the widgets forever... Now they may be easily and intuitively removed by pressing X button in the upper right corner.
At that point it was already good: we have to important functionalities added, but they were still worth next to nothing, because the results were gone whenever the dashboard page was reloaded. Therefore it was the most important issue, to have all the settings being downloaded from server and saved on server if something changed. Of course it all had to be done in AJAXy way, because the whole point of the dashboard page is that the page should not be reloaded. jQuery requests were used and I have to admit that I am quite impressed by them after I got to know them.
The next thing was to remember widget positions, as we could create them, remove or collapse, but they always reappeared in the third column in random order :-) Once I got to know that sortable library can handle events that are triggered after movements are finished, It was simple to remember column changes. I had some problems with positions in columns, but after Mario showed me Firefox tools like DOM Inspector which allows to see real DOM structure, it got easier :-) Thank you for that! :-)
As a result, all changes that a user makes are saved on server, so you can do whatever you want and you should see the same dashboard after reloading the page.
Then I was working for some time on adding support for Task Queue API for Melange. I know it is not a part of statistic module, but in my opinion it is important for the whole project. Basically, I took care of comments that were sent by Pawel. There is just one thing I had to do, so probably I will send a new patch tomorrow.
I also started to work on abstraction of statistic gathering functions. It is almost ready, but I will describe it more in the next week, because I expect some changes.
Tomorrow I am also going to send the first patches for the statistic module. After they are reviewed I hope to push them to the main repository.
Monday, July 13, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment