GSoC’17 Coding period | Week #9 | Drupal

week 9

 

The third phase of the Coding Phase officially kicked off the previous week on July 28th, 16:00, marking the conclusion of the Mid-Evaluation period for Google Summer of Code 2017. At present, I would like to state that I progressed successfully through the mid-term evaluations. The second phase proved to be a worthy learning experience personally resulting . Meanwhile, I have maintained a detailed structure of the code for the port which can be accessed here and have also provided a comprehensive understanding of the current status of the work done in the previous blogpost.

Moving on to the present scenario, the work for the current phase would primarily be to port the ‘Add User wishlist settings’ and ‘Email wishlist’ functionalities. During the gradual completion of the ports, I would also have to deliver the related documentation alongside the designated ports. Additionally, I would have to complete the remaining portion of the ‘Search wishlist’ functionality, and the bugs associated with the port in particular.

Meanwhile, based on a comprehensive analysis for the above mentioned ports, the work done for learning the implementation of the port(s) briefly the earlier week can be stated as:

  • Option to email wishlist to others:

    • This feature would enable users or wish list owners to share any wish list with other users or potential customers by emailing it to the respective user.

    • The Email subject, Email recipients & Email message properties are defined in an appropriate hook_mail implementation.

    • The Form API and Database API would be used for the creation, submission & validation of the wish list email and to provide a structured interface for the dynamic construction of queries to implement the above functionality.

    • Conversion of D7 Hook functions to D8 APIs involving Routes, to define the path to controllers (page callbacks in D7) or to create tabs and/or contextual links. Email address of an user is verified through the Data Common API.

    • The Renderable Array System has to be applied to improve the grouping of form items. The email could be sent by using Mail Manager using public function MailManager::mail.

Email wishlist’ option as seen in D7:

 

email

 

  • Created CSS and JS files for wishlist image slider:

    • Added the CSS and JS code to separate files.

    • Defined a "library", which can contain both CSS and JS files.

    • "Attached" the library to a render array in a hook.

Present D8 directory structure:

 

script

 

Moreover, I would also focus on completing the remaining portion of porting the ‘Search wishlist’ option this week. However, wasn’t able to code much this week, as I had been preoccupied in sorting out few recurring ubuntu issues, which seem to have been fixed as of now.

Overall, the experience so far has been amazing and it’s great to advance onto the final regime of GSoC’17. Winding up, these were the objectives and concepts learned during the eighth week of coding phase in GSoC’17. Hope to learn many more new concepts in the coming weeks for the successful completion of the port.

Cheers!