Skip to main content

Posts

Showing posts from June, 2019

GSoC'19 Coding Period | Week #5 | Icon API

The Google Summer of Code has reached the end of the week #5 of the coding period with my project " Complete porting of Icons API to Drupal 8 " being progressing smoothly with interesting challenges along the way. In my previous blog post , I had mentioned that I'll be implementing the Icon Menu sub-module's form with the select field having the list of icon bundles installed and they will be fetched using the Plugin API and this select field will have an ajax callback which will alter the #autocomplete_route_name value of the Search icon text field. During this week, I've implemented the form for the menu configuration page with the icon fields attached using the hook_form_alter() hook and this form will be visible to the form with the id  menu_link_content_menu_link_content_form and menu_link_edit and as these form have the plugin ID stored at different locations the following snippet of code is used to fetch the desired plugin id from the appropr

GSoC'19 Coding Period | Week #4 | Icon API

The Google Summer of Code has reached the end of the week #4 which marks the end of the first month of the coding period i.e; Phase 1 of GSoC with my project " Complete porting of Icons API to Drupal 8 " being progressing smoothly with interesting challenges along the way. In my previous blog post , I had mentioned that I'll be implementing the fontawesome_bundle.module file to load the appropriate icon library as saved through the configuration form and altering the library location if the library does not exists in the local directory of the module. During this week, I've successfully implemented the logic to load the appropriate icon style library using two hooks  hook_page_attachments() and  hook_library_info_alter(). The  hook_page_attachements()  gets the configuration settings from the fontawesome_bundle.settings and using the  library.discovery service to get the libraries defined in the fontawesome_bundle.libraries.yml and checking the values fo

GSoC'19 Coding Period | Week #3 | Icon API

The Google Summer of Code has reached the end of the week #3 of the coding period with my project " Complete porting of Icons API to Drupal 8 " being progressing smoothly with interesting challenges along the way. In my previous blog post , I had mentioned that I'll be working on implementing the Autocomplete controller class which will display the icons list based on the search keyword provided by the query string and Font Awesome Icon data class which is responsible for parsing and caching the icon data from the icons.yml file provided by the fontawesome icon library. During this week I've implemented the Icon data class called  FontAwesomeIconData class with two functions/methods which are getIconArray() and determinePrefix().  The determinePrefix() function takes the style of icon as a parameter and determines the prefix to be used for that icon. For instance, if the icon style contains brands then it returns ' fab ' otherwise it returns 

GSoC'19 Coding Period | Week #2 | Icon API

The Google Summer of Code has reached the end of the week #2 of the coding period with the project being progressing smoothly with interesting challenges along the way. In my previous blog post , I had mentioned that I'll be working on implementing the configuration form for the fontawesome_bundle sub-module for integrating the Icon bundles into the main icon_api module with the Configure Bundle from the Icon bundles listing page redirecting to this form and defining the .libraries.yml to define the paths for the Fontawesome icons location (.js and .css files). During the second week of the GSoC'19 coding period I have first implemented the configuration form using the Form API and learned about using the dependency injection and injecting the \Drupal\Core\Asset\LibraryDiscovery class first by specifying it as the first parameter of the constructor and injecting the LibraryDiscovery class using the library.discovery service through the \Symfony\Component\DependencyInje

GSoC'19 Coding Period | Week #1 | Icon API

The Coding phase of Google Summer of Code 2019 commenced in the last week on May 27, which marks the end of the Community bonding period. As stated in my previous post , the community bonding period gives the students an opportunity to build affinity with the community and learn more about the project and the organization. Currently, I am working on porting Icon API module to Drupal 8, under the guidance of Chiranjeeb Mahanta , which integrates the Icons into the Blocks, Menu Items, Fields and the content using the shortcodes and it makes the website look beautiful by using the right Icon at the right place. For the first phase/month of the coding period I plan to port the following features: Learnt how to implement the Plugin API which will allow the new Icons bundles to be integrated into the main module and the Icon bundles can accessed from any of the sub-modules. To understand the plugin system the article which helped me understand it is " Unraveling the Drupal 8

Community Bonding with Drupal | GSoC'19

This year I got selected into Google Summer of Code (GSoC'19) under Drupal for the project " Complete porting of Icon API to Drupal 8 ". The Icon API is a module which integrates the icons throughout the drupal site. This blog post focuses on Community bonding period with Drupal for GSoC'19. This year, accepted proposals/projects were announced on May 6, 23:30 IST. The selected students are supposed to participate in the Community bonding before the coding phase actually begins. The coding phase starts from May 27 and ends on August 26 with three project evaluations. The Community bonding period is almost a month long and the students are supposed to contact their mentors to discuss the project, learn more about the organisation's they are contributing to, learn the essentials APIs or technologies required to complete the project. I contacted my mentor Chiranjeeb Mahanta who was the GSoC'17 student worked on the project Porting Wish list module to Drupa