GSoC'19 Coding Period Week #8

GSoC'19 Coding Period Week #8

Week 8 of the GSoC coding period is completed successfully. It was the last week before the second evaluation of the Google Summer of Code 2019. To know about Google Summer of Code (GSoC) refer to my earlier blog post here. This blog post aims about project progress till now and future goals.

 

 

Project Abstract

"Collaborative Editors" is a Drupal 8 module which provides various Drupal Plugins to integrate Real-Time Collaborative Editors in Drupal 8 which will allow the site administrator to collaboratively add/edit content in Drupal.

It will include the following:-

1. Etherpad: Etherpad is an open-source Real-Time Collaborative Rich Text Editor.

2. Google Docs Add-On: It will allow users to publish and update the content of Drupal from the Google Docs document.

3. Microsoft Office 365 Word Add-In:  It will allow users to publish and update the content of Drupal from Microsoft Office 365 Word document.

 

Previous Progress

Completed Etherpad integration feature in  "Etherpad" Drupal plugin. Find more in this video.

"Google Docs" Drupal plugin is completed with the following features:-

1. API Key generation and saving it through Drupal Configuration API.

2. REST routes to exchange data with Google Docs Add-On

Completed Add Site feature in Google Docs Add-On using test_connection route of "Google Docs" Drupal plugin. And completed Publish/Save Content to Drupal feature in Google Docs Add-On. Also completed feature of Update published/saved content of Drupal. Added doc-comments in code and documentation.

Completed 3 PHP Unit Tests.

 

Week 8 Progress

Earlier Etherpad Drupal Plugin set a session cookie in Etherpad to only allow the authorised user to access the Etherpad pad. But as we know that cookie can only be set for the same domain or sub-domain of the same domain. Hence it is not possible to host Drupal & Etherpad on a different domain. So, as per the recommendation of mentors In configuration form I have added a toggle to turn off this session cookie system.

session cookie toggle

 

Previously user needs to manually click on the button to generate new API Key for Google Docs Add-On. Now it will get generated automatically.

API Key generation

 

Previously "Publish to Drupal" Google Docs Add-On only support 2 Content Types i.e. Article and Basic Page.

As we know that for all Node Content Types, some fields like title, status, user ID are mandatory and gets created by default. For "Publish to Drupal" Google Docs Add-On functionality only "text_with_summary" type field is missing from default mandatory fields. So, now I have added support for all the Content Types having a field of type "text_with_summary".

Custom Content Type

 

Previously all the images of content are hosted on Google's server. Now using "Images" core module of Drupal I have added an option to store content's images on Drupal's Local Storage.

Upload to Drupal Local Storage

 

Week 9 Goals

To work upon development of "Publish to Drupal" Microsoft Office 365 Word Add-In.

 

Things I learn in this week

1. A deeper understanding of Drupal Content Types and different Feilds.

2. How to programmatically upload images on Drupal.

 

Difficulties

1. GitHub was down on 2019-07-22 16:02 UTC, due to this I faced difficulty in pushing my codes. More details of the GitHub down issue can be found here.

2. While working on upload images to drupal I faced #2849413 issue.

3. It was a challenge to find the required functions for getting all the Content Types, their fields and type of a field.