User:Ishitva: Difference between revisions

Jump to navigation Jump to search
9,217 bytes added ,  3 August 2014
Line 47: Line 47:
So far so good !
So far so good !
<hr>
<hr>
''' Week 5-6 , 16th June-29th June 2014 '''
The work done during this phase is as follows:
*The change-columns.js file was tested and the changes ([https://github.com/ishitvagoel/bugzilla/commit/5634acc5002011c7840bacd3eade6d86cccb07f7 link]) were committed to the git fork.
*The comments.js file was tested and the fixes to the errors were done. ([https://github.com/ishitvagoel/bugzilla/commit/0488ee028d62c8fc9ee3dfef125ff64194d515f7 link]) While testing comments.js file, it was observed that on clicking on a tag while the comment was in collapsed state did not expand the comment. This was due to the fact that the changes in comments.js file had broken this functionality of the comment-tagging.js file, which can be fixed upon migrating this file.
*The flag.js file was tested and the changes to it were committed. ([https://github.com/ishitvagoel/bugzilla/commit/482332a27b4bdb38575f694184588900c867cc63 link]). The changes worked fine, but an error was observed, in which whenever we move to a new bug page from a current bug page , or create a new bug, the function Y.on() does not get recognized, but when we refresh the page it gets recognized. The reason for this might be a dependency not being loaded. This still needs to be fixed.
*The global.js file was tested and the changes to it were committed. ([https://github.com/ishitvagoel/bugzilla/blob/ee9679ff328911e98c8e1c9577d0a5333afea8be/js/global.js link]). YUI3 modules were added on the index.html.tmpl to enable the functioning of global.js file on index.cgi. The changes worked fine. It was observed that the set_language() function worked fine when changing the language from English to German, but failed while changing back from German to English. It was due to the fact that the DE templates (German) did not have the YUI3 modules and the required changes in them therefore YUI 3 functions were not getting recognized in the reverse process.
*The untested changes to the util.js file ([https://github.com/ishitvagoel/bugzilla/commit/d328a2002f8130d76dc07a6cc3a5985d97ca2965 link]) and the Voting Extension ([https://github.com/ishitvagoel/bugzilla/commit/d6367e6fe7d4d84806525192073fe189866898ea link]) were committed too.
*After all this work we began with the migration of the custom-search.js file. Initially I had got stuck in it as I was getting confused deciding which DOM nodes need to be converted to YUI3 nodes. The confusion was due to the fact that at some places the DOM element was being passed as a parameter to a function and at other places the YUI3 node. Therefore I decided to convert all the uses of the DOM node to the YUI3 nodes. These are the initial untested changes that I have committed ([https://github.com/ishitvagoel/bugzilla/commit/286b611444cd3d4f2eaa3355d951e0f301045ff4 link]).
<hr>
''' Week 7 , 30th June-7th July 2014 '''
This week we decided to work on the migration of Bug.js file.
The bug.js file defines a module "duptable" inside the "bugzilla" object inside the YAHOO global namespace. This module defines the functionality for creating a DataTable widget which retrieves the data by making JSON-RPC calls to the server. This datatable is used for displaying the possible duplicate bugs while creating new bugs.
The bug.js file also defines a module "bugUserLastVisit" which gets created within the self executing function in which it is defined in. This responsibility of this module is to make JSON-RPC calls to the functions 'BugUserLastVisit.update' and 'BugUserLastVisit.get'.
To begin with the work:
*I first read about what [http://en.wikipedia.org/wiki/JSON-RPC JSON-RPC] is as I did not have much idea about it.
*I also had to learn about the [http://www.yuiblog.com/blog/2007/06/12/module-pattern/ Modular Pattern] used.
*After these I read the documentation of YUI2 [http://yui.github.io/yui2/docs/yui_2.9.0_full/datatable/ DataTable] and [http://yui.github.io/yui2/docs/yui_2.9.0_full/datasource/index.html DataSource] and the corresponding documentation for YUI3 [http://yuilibrary.com/yui/docs/datatable/ DataTable] and [https://yuilibrary.com/yui/docs/datasource/ DataSource]. The implementation of DataTable and DataSource are very much different in YUI 2 and YUI 3 and many of the YUI 2 propertis do not exist in YUI 3, so even after reading the documentation I was unsure about how to proceed.After getting stuck here for quite some time I managed to make some initial changes ([https://github.com/ishitvagoel/bugzilla/commit/221e59d2d5cd6d43bb94cb2d66cfc732eabab7d3 link]) to the file to be able to discuss the further changes and approach for migration with my mentor :glob .
<hr>
''' Week 8 , 8th July-13th July 2014 '''
Continuing my work from Week 7:
* I discussed about the approach to follow with my mentor :glob, who then suggested me to first experiment by making a new file and trying to make the JSON-RPC calls get working.So I tried to make a file through which I called the 'Bug.version' method using JSON-RPC. I could get the JSON-RPC calls work fine. Now I had to extend the approach I used here to the bug.js file. At this point my mentor :glob suggested me to take a look at how it is being done on BMO ([https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/MyDashboard/web/js/flags.js link]) for reference. I followed the approach used in BMO and came up with these changes. ([https://github.com/ishitvagoel/bugzilla/commit/ad874b3400134a0a4c909681e71e98bcf746ca0f link]) The BMO work was really helpful. Thanks :glob !
*After these changes I still wasn't sure about which functions to use in the callback for sendRequest method. So then I asked about it from :clarle and he suggested to use the DataTableDataSource plugin for the DataTable and the load() function in place of sendRequest() which by default used the callback which we needed here, so we did not need to define the callback functions.
These were the changes we came up with ([https://github.com/ishitvagoel/bugzilla/commit/fb5b98fac38abecd3969f3786c306f8cb7f0fcf1 link])
*After this I tried to migrate the button widget being used in the formatter. Therefore I read the documentation of [http://yui.github.io/yui2/docs/yui_2.9.0_full/button/index.html YUI 2 Button widget] and [http://yuilibrary.com/yui/docs/button/ YUI 3 Button Widget] and came up with these changes ([https://github.com/ishitvagoel/bugzilla/commit/795a3dcbaa1c1544abfbb5050d3dcbe09906db90 link]). As it can be seen that I had used the 'innerHTML' property for the button, to prevent XSS, :glob suggested me to use the YUI 3 'text' property for displaying HTML escaped text.
*The further testing and experimentation on bug.js file was begun. ([https://github.com/ishitvagoel/bugzilla/commit/1dee2515e8186e9df878f3fee1d64689632610b4 link])
<hr>
''' Week 9 , 14th July-20th July 2014 '''
Continuing the work from previous week:
*Now the data table had started working fine , but an error was coming , in which the data table message was not getting removed even after the data was being loaded. Finally, on discussing this problem on #yui , I came to know that this was because the yui3-skin-sam was not being used, the datatable uses the skin-sam to show and hide messages. So we had to enable the YUI 3 CSS files to be loaded. So I came up with the following changes ([https://github.com/ishitvagoel/bugzilla/commit/7c7ccb1133985374c9fde1a9ac00cee701f18009 link]).
*After this a few more changes to bug.js file were made and the version in which the datatable works fine was committed.([https://github.com/ishitvagoel/bugzilla/commit/9d16250690301da0a2fb1f5f3a7a3cd3a6ae022a link]).
*Upon further testing the bug.js file it was found out that inside the "bugUserLastVisit" modules I had missed to mention the "data" attribute of the Y.io() config. So I added these changes ([https://github.com/ishitvagoel/bugzilla/commit/261c3d88e8681a87807f7b1d1e87ea8760a91022 link]). A few more bugs were fixed.([https://github.com/ishitvagoel/bugzilla/commit/1d20a6b0c5f165f316b88ac20b27c2461d5f15e0 link])
*After this work the all the template files except the the report/report-table.html.tmpl and global/header.html.tmpl have been migrated. The changes to these files are untested and are kept in seperate files and will be committed later. The report-table.html.tmpl and header.html.tmpl files will be migrated later.
<hr>
''' Week 10 , 21st July-27th July 2014 '''
This week we decided to begin with the work on field.js file and comment-tagging.js file.
*I began with reading the documentation for the YUI 2 Autocomplete and Calendar and the corresponding documentation for the YUI 3 version.
*After reading through the documentation I came up with the following initial changes to the field.js file ([https://github.com/ishitvagoel/bugzilla/commit/96ffe69b5fb9490e79a885c37f75c8928e6467be link]). The changes do not work fine yet.
* The initial changes to the file comment-tagging.js were also made ([https://github.com/ishitvagoel/bugzilla/commit/0499c4b6e1644edd120e1115bdf4a12b4e543f5d link]). Some changes are still to be done.
I have some doubts in these two files. I will proceed with these after taking guidance from my mentor.
<hr>
''' Week 1 , 21st July-27th July 2014 '''
{{VerifiedUser}}
{{VerifiedUser}}
Confirmed users
6

edits

Navigation menu