As part of GSoC’16 I’m working on Porting Comment Alter module to Drupal 8 under the mentorship of boobaa and czigor. This blog is an excerpt of the work which I did in the eleventh week of the coding period of GSoC’16. The blogpost for the work done in the tenth week can be found here.
In D7 the comment settings were present on the node and those settings were managed from node edit forms whereas in D8 comments settings became fields and they could be attached to any other entity type (see change record #2100015). In D7 version of the module all the comment related settings were present on that comment settings section of the node type edit/add form. So in D8 we could have added those settings to either the entity_type edit form or to the comment fields and we decided to go with the later one. This week I added all these settings and their implementations along with the tests for them (see commit1 and commit2).
During our weekly stand-up this week we had following discussions:
Last week I added tests for most of the field types but as suggested by my mentors this week I also added tests for Entity Reference fields (see commit). As of now the module is working on Drupal 8.2.x and all the tests are also passing. Once the final review of the module is done we plan to push the code to d.o.
By the end of the week I completed tests for node reference fields and added comment_alter related settings and also added tests for them. For now I’ll work on adding documentation for the module. My mentors have already reviewed the code for the work which I did during this week. If anyone is interested, my progress can be followed in my GitHub repo.