Week 6 of the GSoC coding period is completed successfully. This blog post aims about project progress till now and future goals.
About Google Summer of Code
Google Summer of Code is a global program focused on bringing more student developers into open source software development. Students work with an open-source organization on a 3-month programming project during their break from school.
"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.
Completed "Etherpad" Drupal plugin which allows integration of Etherpad in Drupal 8. Find more in this video.
Initial work for "Google Docs" Drupal plugin is completed which include plugin discovery, API Key generation and saving it through Drupal Configuration API. Also completed Add Site feature in Google Docs Add-On using test_connection route of "Google Docs" Drupal plugin.
Completed 3 PHP Unit Tests.
Week 6 Progress
In "Publish to Drupal" Google Docs Add-On added "Delete Site" feature under "Manage Sites" section. I have used Font Awesome to show Trash icon.
To make sure that no one deletes the site accidentally I have used Google App Script dialogue box with "YES_NO" button group.
In the menu option, I have added "Publish" and "Help" menu items. I have used separator() method of Google App Script to add a separator line between these menu items.
On the selecting "Help" menu a dialogue box will get open with HTML content.
When a person will click on "Publish" menu item from the sidebar, a new sidebar will get open asking the user at which site user want to publish the content.
After selecting the site, various options will get display which are as follow:-
1. The text-area will have summary as a plain text version of the Google Docs document, the user can edit it.
2. To select content type as an Article or Basic page.
3. The Add-On will fetch the list of all the Drupal users (except the anonymous user). Now, the Add-On user will select on behalf of which Drupal user he/she wants to publish the document.
4. Whether to Publish the content or just save it.
Week 7 Goals
1. In Google Docs Add-On, to add the feature of updating published/saved content of Drupal.
3. To complete the text of "Help" dialogue box of Google Docs Add-On
3. To shoot a screencast showing working of this Add-On.
4. To add doc-comments in codes of Google Docs Add-On
5. To add PHP Unit Tests of "Google Docs" Drupal Plugin.
Things I learn in this week
1. How to add a separator between menu items of Google Docs Add-On
2. How to add different dialogue box in Google Docs Add-On
3. How to fetch Title and Content (in HTML and plain text) of Google Docs document.
4. How to make a POST request using Google App Script.
7. How to store data in Google Docs Document Properties
8. To get favicon of any site we can use the below given link
1. In the process of publishing the document, I need to pass the selected site to next HTML page of Google Docs Add-On sidebar. I faced difficulty in doing it.
2. To receive data in Drupal from POST request made by Google Docs Add-On. On POST request of Postman I'm getting data via $request->query->get(), but through it not getting data in case POST request made by Google Docs Add-On. After research I came to know about $request->request->get() through which I got the POST data.