Ishitva

Joined 22 April 2014
7,761 bytes added ,  15 August 2014
Line 48: Line 48:
<hr>
<hr>


''' Week 5-6 , 16th June-29th June 2014 '''
''' Week 5 , 16th June-22nd June 2014 '''


The work done during this phase is as follows:
The work done during this phase is as follows:
Line 57: Line 57:


*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 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.
<hr>
''' Week 6 , 22nd June- 29th June 2014 '''
Continuing work from the previous week:


*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 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.
Line 120: Line 124:
<hr>
<hr>


''' Week 1 , 21st July-27th July 2014 '''
''' Week 11 , 28th July-5th August 2014 '''
 
In this week we continued our work on the field.js file and comment-tagging.js file.
 
*The changes to the comment-tagging.js were made. The file was tested and the debugging was done.([https://github.com/ishitvagoel/bugzilla/commit/34bb3cac4552d8f272c2045334b68818754ece5a#diff-d41d8cd98f00b204e9800998ecf8427e link]). While testing the file the problem of stringifying the form was coming. Earlier we were calling this "Y.io.stringify(form)" , which did not work. Upon discussing the problem on #yui it was found that the correct call was "Y.IO.stringify(form)".([https://github.com/ishitvagoel/bugzilla/commit/49f43eb192758fed04a72fdccc6c68fc478b31bc#diff-d41d8cd98f00b204e9800998ecf8427e link]). Also, initially the Autocomplete widget was not working fine. It was making the JSON RPC calls but was unable to fetch the results. I reported this to my mentor and he found out that due to the recent changes in Bugzilla codebase, the paramaters which we were supplying to the "Bug.search_comment_tags" were coming out to be invalid, we were actually missing the "version" paramater. After my mentor :glob fixed this issue, we observed that only one suggestion was being shown in the autocomplete, again this was found to be an error in the bugzilla code, which my mentor fixed. After all this work on comment-tagging.js file the file worked fine and and all the JSON RPC calls were being made correctly ([https://github.com/ishitvagoel/bugzilla/commit/6a89ec4a3b7ade835daae03cf2f1fec1b01cc30f#diff-d41d8cd98f00b204e9800998ecf8427e link]) . Yippee !
 
*Further debugging of the fields.js was done.([https://github.com/ishitvagoel/bugzilla/commit/7d2bd53044888241d5056c5c91159b8a0d1d37ac#diff-d41d8cd98f00b204e9800998ecf8427e link]). While testing the file, it was observed that calendar widget was working fine on enter_bug.cgi page but not on show_bug.cgi page. This is due to an error in the setFieldFromCalendar() function. On the show_bug.cgi page this function is used to update the deadline text box with the selected deadline for the bug. Right now the date which is being shown in the deadline text box is not correct , although errors are not coming related to the calendar widget in the console. A few minor errors still remain to be fixed.
 
*The migration changes which had been made to the template files were also committed ([https://github.com/ishitvagoel/bugzilla/commit/c1db3a0346ae46681f4b26413aa2b23565444df5#diff-d41d8cd98f00b204e9800998ecf8427e link]) . The changes to the report-table.html.tmpl and header.html.tmpl have also been started.
<hr>
 
''' Week 12 , 6th August-15th August 2014 '''
 
Continuing from the previous week:
 
*So far we had tried to migrate the report-table.html.tmpl file taking insipiration from this [https://yuilibrary.com/yui/docs/datasource/datasource-local.html example on using DataSource Local] and made these changes ([https://github.com/ishitvagoel/bugzilla/blob/714717468683d7863a320dc7497485b97a2fa385/template/en/default/reports/report-table.html.tmpl link]). These changes used the XML schema plugin to convert an HTML table into a YUI3 datatable. These changes were not working fine.The datatable was not being created but the datasource was being created. Then I tried to just create a datatable without using the sort functionality and the formatters and the datatable was created but it did not replace the original HTML table. I discussed it my mentor and he advised me to change the approach that I had been using here. He suggested that we create a JSON of the data and then directly feed it into the YUI3 table. We no longer need to create an HTML table and then convert it into a YUI3 datatable. So I started reading the [http://www.template-toolkit.org/docs/manual/Intro.html Templating Toolkit 2 documentation].The work on report-table.html.tmpl is still in progress.
 
*We made some changes on the header.html.tmpl file as well. Initially I was stuck here identifying the approach to migrate the Firefox BFCACHE hacks on the header. I discussed it with my mentor and he informed me that the BFCACHE hacks were no longer required as the YUI team has fixed the issue in their code.So it was safe to remove them.I removed the hacks and tested that the problem which they addressed were no longer being encountered. The migration was performed on the file and after this I started the cleanup of YUI2 code from the file. Some parts of YUI2 could not be removed as on removing them an internal error on bugzilla pages come up. Work on this file is in progress too.
 
*Since the scope of this project was found to be much larger than what could be completed within the duration of the Google Summer Of Code 2014 coding period ,the project will be continued post GSoC period as well.
<hr>
 
====Final Writeup====
''
 
Finally the GSoC 2014 is nearing its completion. It had been a wonderful learning experience working on the migration of Bugzilla codebase from YUI 2 to YUI 3 while working under the guidance of my mentor Mr.Byron Jones. We faced a lot of challenges together and progressed :)
 
'''Following is the summary of the work we have done during the GSOC period:'''
 
*Did some initial work on the loader to laod YUI3 modules, enough to be able to proceed with the migration of the files.
 
*Learnt to use the Firefox Dev tools for debugging the Source files, inspecting the elements on the page and inspecting the POST requests.
 
*Migrated all the Javascript files.
 
*Migrated all the template files which used the YUI2 code and made changes to other templates wherever necessary. The work on report-table.html.tmpl and header.html.tmpl is still in progress.
 
*Experimented on the Loader which calculates module dependencies itself.
 
'''No significant work comes without challenges, so the following are the challenges we faced:'''
 
* YUI3 has been designed to be used within the sandboxes. The Bugzilla codebase had to be changed a lot to be able to use the sandboxes so we had to proceed like we used to do with YUI 2. This put up a difficult challenge in front of us. YUI3 modules have a lot of dependencies, so we had to use the Configurator to find out all the dependencies and mention all the modules inside the yui3 arrays on the templates. This made the loading of the modules a very slow process and when we missed out on a specific module it became very difficult to search for it.
 
*While cleaning up th YUI2 code from the header.html.tmpl file not all code related to functioning of YUI2 code could be removed as they need further work before we can remove them.
 
* Migration of the widgets was the most challenging part. YUI 2 and YUI 3 implement the Widgets quite differently.
 
* Getting the JSON-RPC calls through the widgets working correctly was equally challenging.
 
''' The work to be done post GSoC period : '''
 
* Completing the migration of report-table.html.tmpl file, using the JSON data approach.
 
* Cleaning up of YUI2 code completely from the codebase by making appropriate changes.
* Improving the Loader to make dependency calculation and module loading easier.
 
* Conversion of HTML event attributes to Javascript event listeners.
 
====Note of Thanks !====
''
 
A heartfelt thank you to my mentor Mr. Byron Jones who helped me during my work. He always patiently clarified my doubts, even the silly ones :P He supported me in my work even when things had become a little challenging for me and was always very helpful. Thank you glob !<br>
I would also like to thank the members of the YUI team who from time to time showed me the way when I had got stuck with the migrations or wanted to know the things which were not mentioned in the YUI3 documentation.
 
Thank you all :)
 


{{VerifiedUser}}
{{VerifiedUser}}
Confirmed users
6

edits