Closed (fixed)
Project:
Affiliates Connect
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 May 2018 at 20:10 UTC
Updated:
15 Jun 2018 at 10:29 UTC
Jump to comment: Most recent, Most recent file
This will contain the basic module skeleton with module.info.yml files and required folders.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | part2.png | 143.73 KB | chiranjeeb2410 |
| #21 | part1.png | 148.7 KB | chiranjeeb2410 |
| #21 | part4.png | 13.55 KB | chiranjeeb2410 |
| #16 | interdiff.txt | 12.5 KB | ankitjain28may |
| #16 | module-structure-2975659-16.patch | 11.71 KB | ankitjain28may |
Comments
Comment #2
ankitjain28may commentedComment #3
ankitjain28may commentedComment #4
dbjpanda commentedpackage: Affiliates Connect
It will be added automatically by the packager on drupal.org. No need to add version.
Can you keep *Base, *Interface, *Manager outside of plugin like this https://cgit.drupalcode.org/search_api_location/tree/src or https://cgit.drupalcode.org/geocoder/tree/src
I hope it is best practice to define only plugins inside plugin folder. plugin type should be defined outside of plugin folder.
And provide a proper description inside *interface that what this AffilaiteNetwork plugin type is going to do ?
Comment #5
borisson_All of the points in #4 are solid, but I have a couple more:
Most hook help implementations start with an
h3-level title before the actual content of the help.This shuold probably be split up into multiple smaller sentences as well.
We should introduce our own permission instead of reusing this one. That can be done in a new follow-up issue though.
/s/module/affiliate plugin/ ?
private properties / methods aren't used very often in core/contrib. This is so that we can more easily overwrite them from custom code.
This baseclass is useless right now, we can remove it and add one when it's needed.
Useing the
class::classnotation is easier for refactoring later.So something like
AffiliatesNetworkInterface::classComment #6
gvsoComment #7
ankitjain28may commentedThanks for the review, i will make the changes :)
Comment #8
ankitjain28may commentedI have made the changes as stated in the above comments, please review.
Comment #9
ankitjain28may commentedSorry, Added the wrong patch, please ignore the above one, Review this.
Comment #10
dbjpanda commented@ankitjain28may You have only uploaded the interdiff, Have you forgotten to upload the patch ?
Comment #11
ankitjain28may commented@dbjpanda sorry, I added the patch and the interdiff.
Comment #12
chiranjeeb2410 commentedComment #13
Lal_you can use description.html.twig I think it would make it much simpler just check...
https://cgit.drupalcode.org/examples/tree/menu_example/templates/descrip...
https://cgit.drupalcode.org/examples/tree/menu_example/src/Controller/Me...
Comment #14
ankitjain28may commented@Lal_Thanks, This looks great, I will make the changes.
Comment #15
gvsoI'm not sure if there is a coding standard for boolean in .settings.yml file, but I have never seen this convention in any modules (looks like python to me). I have seen either all with uppercase letters or all with lowercase letters. It seems like core is using lowercase
Comment #16
ankitjain28may commentedI made the changes, Please review.
Comment #17
borisson_I think this is a great first start. We should probably add tests as well. Maybe that can be a followup though.
A test that checks that the created routes exist and return a 200-OK should be suffient for now.
I have some code style problems with this as well, but I'd suggest that we can fix those after we commit this, so we can have automated tests enabled, making fixing those easier.
Comment #18
ankitjain28may commented@borisson_ Thanks for the review, I will write tests in the follow-up and fix code style problems too.
Comment #19
borisson_Awesome, in that case this seems like a solid base to start from. Leaving to @dbjpanda to RTBC and/or commit but +1 from me.
Comment #20
thedrupalkid commentedFor any improvisations we can always create a different issue. Hence, As per the Issue Summary moving it to RTBC.
Comment #21
chiranjeeb2410 commented@borrison_, @dbjpanda, @ankitjain28may
The module skeleton seems to be working fine as of now along with the Config Settings page. Ran and tested the
code for the same and seems RTBC to me.
Seems good to commit this. Attaching screenshots below.
Comment #23
dbjpanda commentedThanks to all of you. Committed. Great job @ankitjain28may