 Hello everyone, my name is Adrian Cid, I'm here to present the speech How to Contribute Project to Drupal, so here you can see my profiles, I'm Drupal in for six years and two months and I'm a member of the Drupal Association, if you don't know what is the Drupal Association is dedicated to fostering and supporting the Drupal software project, the community and its role, so you can help the Drupal community being a member, so if you are not a member please check the link. Some concepts contribute is to give money to a common supply fund etc. as a charitable purpose. Example, can you contribute to buy my ticket for the Drupal common? Yes or no? You don't want to see the second part, so really is to contribute is to give money, knowledge, assistance and other things, in this case can you contribute to Drupal? It's a real question. We were talking about how to create a Drupal project, how to work with the issue queue, simple tax for your first contributions, some common project issues, Drupal standards, the project page and how to release your project. So you say how to contribute projects to Drupal, people usually think that it's very easy so there are really five tips that you need to follow, visit the create project page, fill out the form, enter a project's short name, click the the save button and click the version control tab for intrusions. That's what you will find in the Drupal point or J site. This is the first tip to start contributing. So that's it. It's not really like this, it's more hard you will see that it's a little hard to contribute project to Drupal. The first tip, you go to the create project page. In this case we will talking about models but 80-90% is similar to other kind of projects so you choose the model project, you will fill out the form. In the project type you can select sandbox or full project, you will enter your project name, there is a maintenance status that you need to choose to inform the user what is the status of your project and the development status. Then you go at the bottom of the form and you will click the save button but there is a message always in the community that say that Drupal community promotes collaboration rather than competition. So if you will create a project that is very similar to another project maybe it's better to open an issue in the issue queue of this project and contribute a patch, join force to build a more stronger models or teams or distributions. So it's better to contribute than to create a competition in the Drupal community. Then you will click the version control tab for instruction on how to commit your code to the Drupal service. Now we have a Drupal project that we can start contributing to Drupal. This will be mainly our work when we are contributed working with the issue queue of your project. You know what is the issue queue or not? Yes? So usually when you create a project Drupal will create for you the issue queue if not always you can go and edit in your project page and you can activate you see say enable issue tracker. This will be create the issue queue for your project and you will see in the right of the project page something like this with the open issue the total of issue and some static piece about your project and usually I put the information that you see in the left some information with guidelines of how to contribute to the project. You usually need to pay attention to this guideline we will see why this will help the contributors to improve the model fix the box. Okay creating an issue this is the screen that you will see when you go to create a new issue. The text in the in the blue box this is a text that comes with the Drupal in the Drupal side say if you want to create an issue please read this before here you will find the issue template summary template and if you will create another issue security is another issue queue different from this it's not public and additionally you can add the information that you see in the green in the green box this is an information that you you can add for your project with some particular guideline by example if you want to provide a patch put a link for the naming convention for the patch and an example there is another project like the webform model I don't know if you know the webform model but if you go to the issue queue you will see that the maintainer add a more strict or more good line on how to create an issue for the project because if you add more information when you create your issue the maintainer will be able to find the problem quickly or how to fix the problem or how to improve the model with your with your new request so a well-described issue helped a lot to the the maintainer helped a lot in their work okay let's create our first issue this is a real issue in the only one model this is a user that create this issue but with some problems as the user don't read the don't read the the guideline to create the issue you will see here the issue summary template it's not used in this case so even if Drupal add a message and the contributors add another message usually nobody read this message and write what they think that is issue description when create the report so usually I create I reply with a message like this hi central reporting will be great if the next time you will use the issue summary template to report one issue I will check now the issue our job here usually is free but take our time so if you describe in the correct way an issue will be better for for us in the Drupal community we live in many different country and speak different language I usually speak in French or Spanish so English is a little hard for me and in a good example of of this but we need English to communicate in the community if you don't know how to write in English or if you don't know how to create a good message you can use tools like Google translate so thanks for Google translate this speech is possible and usually I use a tool grammarly that will create for you some will fix some problems when you write your sentence usually I recommend to use this tool when you are if you are if you are not an English speaker it's difficult to you to write in English I recommend this tool another problem with this issue when I try it to to reproduce the problem that the the user described I'm not able to reproduce the steps so why this happens if you go to see the issue summary template you will see that that it say in the problem motivation you need to to write why the issue was filled the state to reproduce the problem and all the information that will help the maintainer to solve the issue this is why it's important to read on to know the issue summary template sometime if even if you describe the problem without the steep to reproduce it's hard to see the problem and try to fix it always be polite with the user that report the issue remember that you start like a baby and then you made some steep and then you walk it and then you run so we need to teach other in the correct way so I always write a polite message saying please can you use the next time the user to marry template and sometime the users risk reply my mess okay I forget it I will do it for the next time and the next time it's better for me or for the contributor to start solving the problems this is a joke for from Star Wars then how a correct issue should look like a correct issue is something like this you will see a problem or motivation the steep to reproduce proposed solution and remaining touch sometime people think that this only happens in the core issue queue but there are many many prior that use the issue summary template we have here a bottom maybe you never seen before it's a first time that you see this bottom it's a clone issue first time or had you seen this before we will see now what that this button is for there are a tool that will help you a lot in the issue queue is the DR editor this is an extension for Drupal that in hey in ends the user expert is experienced functionality you will have template insertion path reviewer auto completion and image attachment and better so no more excuse to don't review a patch no more excuse about not using the issue summary template okay when you install these addons to Firefox or or Chrome you will have two buttons the first say insert template when you click the bottom you will see that in the issue body where you write the issue description this will be filled automatically so you will have the template from describe the issue automatically if you want to add tasks for your issue you can click in the other button that say insert tasks and you will have automatically inserted a template for your project have you reviewed before a patch for a project yes it's something like this it's very hard to to see what have been changed what what are the new lines what are the deleted lines but with dear editor you will see something like this there is a bottom that save review when you click the button you will see in green the new lines in the that will be added and in red you will see the line that are deleted in the patch you can use it in Google Chrome and Firefox at the left you will have the file that are modified by the patch and if you click in the file you will go automatically to the code for this file because usually in a patch you have all the code and you need to to take the the bar to go up or down to see but here you can click directly in the file and if you want you can hide all the deletion that will be approved once the the patch will be applied so you can see only the additions another useful button will be the simple test button have you seen before this side okay this side okay because we have here again Yoda this side will help you to install a module and apply at the same time a patch and you can install different modules and test your patch this is very useful because you will you don't need to create a new Drupal installation and apply the patch to see if the patch works or not or solve the problem so this is a good tool if you if you need to test modules in the Drupal community and if you need to test patch there is another functionality usually you see something like this in gray there is a piece of code with comments this is possible with this tool the editor you only need to select the lines that you want that you want to comment and add the comment for this line to the left and when you save and publish your comment you will see something like this at the bottom of the page so review patch is very easy when when when you use this tool we have auto completion with the editor some comments HTML tags can be completed if there is a user that write the comment in the in the issue and you use the I know how to say a robust the email at you type this sign and you put the initial by example s and you hit tap song if song writes on comment before they will be auto completed the username so no more copy and paste if you want to create a link to a comment from another user maybe okay I tried the patch in number five and you hit tap a link will be created automatically to the comment with the number five the same for the URL if you have another issue with a number you will put the URL and hit tap and you will see something like this and link to the issue and with a color that talk about the status of the issue is if it's neat needs review will be yellow patch to be ported is gray fix it is green and close is red and the last functionality is used to embed image in your in your issue usually you need to right click copy image your ill and then you need to click in the bottom to add the link but here you only need to click the embed button and the image code will be added automatically in your issue well now we have the tools and we can start contributing to the Rupal so here we will see some simple tax for your first contributions if you want to to have a module in Rupal the first task is create the info file with this you bring to life your your model this is how a issue for for the info file will be looked like something like this when you go to create your issue usually you need to write the title the category task book report future request the priority high normal low and the rumor lower I think the status usually when you create is open the version because you can have different version for Drupal 8 and different version for Drupal 7 and Drupal 6 the component code documentation user interface and who will be assigned to solve the issue this is important because sometimes you are working to solve a bug and other people want to work together and they can see who are working to solve the problem off is there is nobody trying to fix the problem and we have at the bottom the tax you have different tax that can help to filter the issue like novice php ccs javascript drosh command there are many different tax usually in the sprint in the Drupal cons there are a attack to filter the issues that will be solved but okay it's useful always try to add a link that will be guide the the people trying to fix the issue on what like a documentation or how to how to fix the problem on some links giving more information about the problems this is always usual useful in this case we have the issue and this is the final code that we will have when we solve this issue this is like like a guy for person that are starting to contribute to Drupal usually you see this this frass in the Drupal community in Drupal there is a model for anything but what we can do with it so if you want to inform your users or the people that use your models you need to do two things you need to create the read me and you need to create the help page for your model so this is too usual issue that you need to have in a Drupal project once you go to create your read me file there is a template that say all the information that you need to put into the file here you see one example for the asana model there are sections in this case we have introduction requirement installation configuration and maintainers and when you go to create the help page there is a link yes practices you know you have the read me the TXT right so you do you have a specific way of doing it because you know for some personally I use the API module for documentation wherever it doesn't parse TXT files right for you what's the best way of doing documentation in Drupal because probably the read me that TXT is where it's it can be parsed probably with a parser in Drupal right in Drupal.org but is there a better way of doing things or best practices and documentation there is another thing that we will be we will see at the end we have the read me is for the basic documentation about your model how your model works how to install your model requirement additional models maybe some drush command that comes with your model you have the the project page in the project page you can add more information about how to use your model and you have the model guide this is we will see an example at the end this is more X bigger and you can put more information you can add image example of how to use your model I don't know if this answer your question you're talking about the about the documentation for your functions I just add the doc block in each function because in this case is a simple documentation on how to start using your model that's why I put in this file is like the quick start guide and then when you go to the help page is like how to use the model and what come with the model and then you can create in Drupal another page to show with more example how to use your model how to extend your model you will see an example there is another common issue that you can have in your project if you need a library usually we use composer even if it's not mandatory to have a compose composer JSON file in your project it's a good practice if you include one like this in your project so here you have another common issue that you can use create a composer JSON file here we have the example now keeping the record of your change usually when you develop you add new features you create some tax to fix problem or you add new functionality to your model but your user need to be informed about the change that's what you see each time that Drupal create a new version you can go to see the change log and see what what the problem comes with the model what problem are sorbet or what new tax are included in the in the project so if you don't find something in Drupal or you think that we don't have a standard or a guide to create something you can go always to the issue for Drupal core idea and create a new issue and will be discussed and maybe will be created a new guide or a new standard or something like this to help to other people to contribute to Drupal in this case we need the change log file here you can see a template for this issue we have a link to the guy that talk how to create the commit message and how to create the the message for the change log and this will be one example of change log file we have the issue number then the people that that help fixing the problem and a description of the issue some people think that they need to take each line from the guide log and then put this information in a file but we have a tool in the community to create automatically this file the git relays node for drosh is a command that will add in your environment some drosh command that will help you to create the change log file here you will see the project the project page and this is the common drosh error in change log this is something that some people don't imagine that exists but in Drupal we have a standard for the user interface there is a page in Drupal for the user interface standard I said that say do not use please this make it sound as the user is supposed to do a favor for someone so maybe if you contribute model you can you need to check your model to see if you add please enter your name or please select here your age we need to remove this from Drupal and another don't refer to Drupal in the model help page this is something that when I see this oh why but they say because somebody can't take your model to create a distribution they don't want that the users know that is Drupal what you are using for the for the site so you need to remove Drupal from the model help page so this is two other commons issue that you can find in your project read these links and you will surprise to another thing that you need to take in code when you create your your models related to the user interface another important part in the community is the coding standard so when you when you code when you create your code it's important to have in mind all the Drupal standard there are some standard that are easy to remember but there are another that's that is a little difficult and sometimes you forget to remove one use statement that you use and you delete the code you have one you said use statement you can use this tool color there is a common PHP CS with some parameters and this command will review all your files and you will see a report like this the fine name and the line with the problems in this case you see that there is a X here when it comes like this you can use another common to fix automatically this problem because in this case is you use it use statement so the tool will be removed automatically for you and you ruin again PHP CS and you will only see the problem that you need to fix manually so this is a powerful tool for verify the coding a standard do you know about this tool if not it's time to take a look okay now we will talk about the project page the project page is very important because when you go to Drupal to search a project this is what you see before use the project the project page this is a little joke about Drupal okay tips for a grid project page usually you need to include these things in your prayer page and we will see that if you create your model and then you try to create your project page this will be very easy for you because you have maybe 16 or 18 percent of all what you need to write in this page the third the the first thing is show the user what your problem your project do what problem does it solve with the audience how your project can help to solve some problems but this information is in two into into site that you create before this is one example for the modules weight project the project page you remember that you write the the project help page where the information that you put in this in this hook in the hook help is similar to the information that you will write in your project page in the left side we have the help page for the model and the right side we have the project page the requirement the requirement for your model is a section inside the read me file so you only need to go to your read me file and if you write your requirement because your model maybe need in this case for the asana project we need this one additional library so you only copy paste and maybe add a little format to your text and you have your requirement section for your project page recommend recommended modules this is another section from your read me file so you only need to go to your read me file copy and paste in the project page known problems for this section this is one example for the node revision delete project you go to the project issue queue and you filter for the category book report that are open and you will see what are the problems that the people know about your project that are not solved but as you put this information in the project page similar project and how they are different this is the hardest part because you need to go to the Drupal model page you need to filter in this case we filter by node revision delete and you need to check all the models that do something similar to your project and then you need to study to study this model to see what are the difference between the model that you are creating and the other model that exists if you see here this is a model with a link to the model here this is a little description about this model and here the difference between the node revision delete model and the provisioning model like this you will guide your users or the people that are using your model to see if they need another similar model or they need your model if you go to see the node revision delete project page in Drupal you will see I think that this is a this is a model that I maintain I think that this is a good example of a project page you will see many sections with many information about the model and all I think that all the section that the people say that you need to have in your project page you can found it in the node revision delete model for the resource in the edit form for your project page you will see that you can add screenshot documentation demo for the demo you can only use the simple test link here simple test project and your private name and this will be create a link to test automatically your model in the simple test site the change look and you can add a link to the to your model documentation guide something important to have in mind when you are developing or maintaining a Drupal model is to stay up to date with the core modification with the new core change because usually something are changing in the core like this is a good example that Drupal get the message and Drupal set message function will be replaced in Drupal point six by a message a messenger service so if you know these six month four months before the release of the new version of Drupal you can start creating your patch there is a Twitter channel a Twitter user that you can follow with the change for the Drupal core or you can go to your tree to check the issue queue for the change so when when you see a change in the core that will affect your your model you can create automatically a new issue queue or a user can create a new issue in the issue queue for you and you can start working in the patch this is one example in one model in the admin toolbar model but this user forget to use the issue summary template so I just add another message a polite message saying send for reporting please remember the next time use the issue the issue summary template okay as Drupal inform the users that there are change in the core you need to inform your user that you will add some change in your model for this you have the change record in the change record you will add in which brand the change is introduced in which version the change will be introduced add a description and you can add one example talking about what's new or what will be modified and what be deleted in your in your model you can write your guide for your project this is important because in the read me file is the basic information to start using your model in the model help page is you there are another information talking about your model description about your model how to use your model but you can add additional information in the documentation guide for your model we're something like how to extend your model in this case this is a model that dispatch and even and the user the create another model can use this even to create new functionality in another model so in this case this information is used to create a sub model that will be create an integration between the only one model and the admin toolbar so this is this is an information that usually you don't find in the read me or in the model help page so you create a guide where you will be explained how to extend your model or how to to use your model you can add image or another information so release the baby if you go to your project page you will see that there is a guy saying how to release your project you need to create a tag push the tag to the server and then you will have a link to create a new release and you will have the information for the release there is there are there is an important part that are the release note the release note when Drupal core when the Drupal project release a new version you see that there are four if many many lines saying what are new in the project what box are fixes in the project what are the new features and usually you need to add this information in your project to I will put here one example for the admin toolbar project this is a release note but this no say this this is nothing when you read many book fix it with books new feature okay but what are the new features and cold cleaning here you don't know what are new in the models but you can use the git release note for drosh you remember the the project that we talked about before you can create this release note in this case you have more information you have a link to the issue you have a link to the user that help to solve the problem and you have the description but there is another tool Drupal point or gcli this is a this is a tool that allow you to use this command to create a better release note so if you see here in this site we have more information we have the contributors with links to the profiles we have the change we have a section for the box features and tasks for the model if you are stuck in some point you can get help from the community usually I use the Drupal answer site to describe the problem that I have I created a description there are many users that usually answer your questions and if I pass today or three days without having a without having a answer I go to slack and I'm please somebody know how to fix this and I put the link and usually there are users that will help you solving the problems that you have in your models so keep keep in mind learn how to contribute to Drupal at least for me take me years and I'm still learning how to do the thing in the correct way every week I I see a new thing I I discover how to improve the model how to create new thing in the models so don't think that this presentation for one hour will convert will create a master for you will will be like the like the the magic want so take your time to the a little about this if you want to improve your model and if you want to start contributing to Drupal here there are some models that I maintain in the community the admin toolbar model the only one model drosh help models weight and no revision delete if you want to see the full list you can go to to my Drupal profile what that's all for the presentation and send for your attention we have Yoda again here are you still away so I'm sorry for my English next time will be in Spanish as you will enjoy it I know so if you have some question no that's the end it seems