As presented at MidCamp 2025

This commit is contained in:
benjamin melançon 2025-05-24 18:53:54 -04:00
parent 2c07d32a81
commit 168d2a3479
2 changed files with 117 additions and 39 deletions

View file

@ -263,7 +263,7 @@ Note: So let's start there.
--- ---
![Modules search](images/modules-search.png) ![Modules search](content/images/modules-search-2025.png)
Note: I definitely recommend changing core compatibility to something reasonable, Drupal 10, to start. And Status to "All projects", not just Full, non-sandbox projects, if you're ready to write a module. A sandbox may be a great start. And then allow any version. Then put in your key words and search. Remove the version— perhaps your best bet is porting an existing module. Use lots of different keywords. Note: I definitely recommend changing core compatibility to something reasonable, Drupal 10, to start. And Status to "All projects", not just Full, non-sandbox projects, if you're ready to write a module. A sandbox may be a great start. And then allow any version. Then put in your key words and search. Remove the version— perhaps your best bet is porting an existing module. Use lots of different keywords.
@ -321,6 +321,12 @@ Note: Build on or with some major —and with luck join a community of people in
--- ---
### Become a co-maintainer
[Guide to Co-maintaining Modules - drupal.org/node/1705758](https://www.drupal.org/docs/getting-started/drupal-distributions/distribution-documentation/community-media/getting-involved-commitment-to-contribute/guide-to-co-maintaining-modules)
---
### Look for opportunities to plug in ### Look for opportunities to plug in
No, literally, look for plugins. No, literally, look for plugins.
@ -602,8 +608,36 @@ Note: @TODO bring in, cleaned up and not confusing
---- ----
<small>In class `InotherwordsListFormatter` we extend `EntityReferenceLabelFormatter`</small>
```php
public function viewElements(FieldItemListInterface $items, $langcode) {
```
```php
$inotherwords = oxford_comma_list($elements, $oxford_comma_settings);
```
```
$elements[0] = [
'#theme' => 'inotherwords_series_wrapped__list' . $theme_suggest,
'#text_before' => self::processPlural($text_before, $single),
'#items' => $inotherwords,
'#text_after' => self::processPlural($text_after, $single),
];
```
----
```php
<?php
namespace Drupal\inotherwords\Plugin\Field\FieldFormatter;
use function Agaric\OxfordComma\oxford_comma_list;
```
Note: That function that is central
--- ---
@ -638,53 +672,43 @@ Note: Someone may make a tiny improvement that makes everyone's lives better.
--- ---
### How to develop while sharing the same code you're using ### How to develop while sharing the same code you're working on andusing
Your module `composer.json`: Make a development release (your current branch, like `1.0.x` or `2.0.x`)
```json
{
"name": "drupal/cyborgtranslate",
"description": "Trigger Google translate and Drupal interface translation at the same time, allowing sections of your site's localization to be done by humans and the rest by machines.",
"keywords": ["drupal", "translation", "multilingual", "localization", "google translate"],
"type": "drupal-module",
"license": "GPL-2.0+",
"homepage": "https://www.drupal.org/project/cyborgtranslate",
"minimum-stability": "dev",
"support": {
"issues": "https://www.drupal.org/project/issues/cyborgtranslate",
"source": "https://gitlab.com/agaric/drupal/cyborgtranslate/tree/8.x-1.x"
}
}
```
Note: Composer makes a lot of stuff seem more complicated, but it makes it easier to contribute. Trust me... this will only be three screens of gibberish. It's also possible to read from other sources, not just Drupal.org. In this case, for example, we are getting the project from our GitLab mirror, which we have so people can submit merge requests if they would like.
---
Your project root `composer.json`: Your project root `composer.json`:
```json ```json
{ {
"require": { "require": {
"drupal/core": "^8.8.0", "drupal/core": "^11",
"drupal/cyborgtranslate": "dev-8.x-1.x as 1.x-dev", "drupal/tomselect": "^2.0.x-dev@dev",
"drush/drush": "^9.0" "drush/drush": "*"
}, },
"repositories": { "repositories": {
"drupal": { "drupal": {
"type": "composer", "type": "composer",
"url": "https://packages.drupal.org/8" "url": "https://packages.drupal.org/8"
},
"drupal/cyborgtranslate": {
"type": "git",
"url": "git@gitlab.com:agaric/drupal/cyborgtranslate.git"
} }
} }
} }
``` ```
Note: You have no idea how much easier this is now, i used to warn people that three pages of gibberish would be worth it.
----
Add this to a `~/.gitconfig` file (or the equivalent on your OS).
```yaml
# Git push helper via https://www.jvt.me/posts/2019/03/20/git-rewrite-url-https-ssh/
[url "ssh://git@github.com/"]
pushInsteadOf = https://github.com/
[url "ssh://git@gitlab.com/"]
pushInsteadOf = https://gitlab.com/
[url "ssh://git@git.drupal.org/"]
```
--- ---
### Examples for developers project ### Examples for developers project
@ -695,10 +719,8 @@ Note: It's like it was written just for you.
--- ---
- Drupal.org/planet <small>to keep up to date with what is going on in the Drupal world</small>
- Drupal.tv <small>for recording of talks at different conferences</small>
Drupal.org/planet to keep up to date with what is going on in the Drupal world.
Drupal.tv for recording of talks at different conferences.
Drupical.com to find out about events happening in your city. Drupical.com to find out about events happening in your city.
The official Drupal API documentation. The official Drupal API documentation.
The Drupal Slack to get community support. The Drupal Slack to get community support.
@ -725,13 +747,31 @@ I hate to recommend people get on proprietary services, but Slack at least is no
---- ----
1. Thank people for their contributions.
2. Use "Plan" issues to coordinate releases, and use the "parent" field to cross-reference releases. This helps people see what you are planning, and what release a specific change is added to.
3. Add test coverage step by step to make sure you don't accidentally break something.
4. Go slowly.
-----
#### Add test coverage
[Testing a Drupal module - drupal.org/testing](https://www.drupal.org/docs/develop/creating-modules/basic-module-building-tutorial-lorem-ipsum-generator/testing-a-drupal-module)
Join the `#testing` channel in Drupal Slack.
Note: My opinion— don't let not having tests stop you from sharing.
----
### You can start / leave your module in "Sandbox" mode ### You can start / leave your module in "Sandbox" mode
You do not have to make your module a full project right away. You do not have to make your module a full project right away.
(but i do) (but i do)
Note: I generally do as soon as i have Note: I generally make it a full project as soon as i have a full plan for what it needs to do and have started writing code.
----- -----
@ -761,13 +801,35 @@ There is another option there, 'Unsupported', but please do not select that afte
Note: Be willing to commit based on your own opinion, don’t let issues languish waiting for the community to test, if you feel it’s good and you gave a bit of time (or feel it doesn’t need it) be willing to commit it on your own accord (also valid for “maintainer adjusted on commit”) Note: Be willing to commit based on your own opinion, don’t let issues languish waiting for the community to test, if you feel it’s good and you gave a bit of time (or feel it doesn’t need it) be willing to commit it on your own accord (also valid for “maintainer adjusted on commit”)
From From Maintainers slack.
--- ---
### Be a part of something bigger, part 2
- Integrating a 3rd-party library (JavaScript, PHP) or service?
- Remember you can file support & feature requests there!
- Want your module to respect people's human rights? (And not violate some good laws?)
- Make it accessible. You won't be alone.
---- ----
### Write and/or generate release notes #### Join the fantastic community of people working for accessibility in Drupal
- [drupal.org/docs/getting-started/accessibility](https://www.drupal.org/docs/getting-started/accessibility)
- [How to Ensure Your Contribution is Accessible](https://www.drupal.org/docs/getting-started/accessibility/how-to-ensure-your-contribution-is-accessible) ([drupal.org/node/3106750](https://www.drupal.org/node/3106750))
- Go to [Drupal Accessibility (a11y) Office Hours](https://www.drupal.org/docs/getting-started/accessibility/drupal-accessibility-a11y-office-hours) ([drupal.org/node/3107258](https://www.drupal.org/node/3107258))
- Join the `#accessibility` channel in Drupal Slack
Note: There is more in Drupal (and beyond!) than specific modules and ecosystems; there are people working on fantastic initiatives.
---
### Release!
----
#### Write and/or generate release notes
[drupal-mrn.dev](https://drupal-mrn.dev/) [drupal-mrn.dev](https://drupal-mrn.dev/)
@ -801,6 +863,12 @@ Note: Yet another community within the community you can join! Drupal helps a l
--- ---
### Be a part of something, part 3
Go to more camps!
Check for PHP and Symfony meetups and events.
Join local user groups, or the nearest (geographically or topical) one that hosts virtual events. Join local user groups, or the nearest (geographically or topical) one that hosts virtual events.
Agaric Show & Tell Agaric Show & Tell
@ -811,6 +879,16 @@ Thursdays 2pm Central
--- ---
### Don't be afraid to make mistakes.
We're all human 🙂
— lleber (Luke Alan Leber)
Note: Not to take away from that important and universal sentiment, but Luke's Slack status is "Mad Scientisting Things" (Applications Developer @ Penn State)
---
![Little rabbit in big grass](content/images/little-rabbit-in-big-grass.jpg) ![Little rabbit in big grass](content/images/little-rabbit-in-big-grass.jpg)
agaric.coop/wtnamft &middot; <a href="mailto:ask@agaric.coop">ASK@AGARIC.COOP</a> agaric.coop/wtnamft &middot; <a href="mailto:ask@agaric.coop">ASK@AGARIC.COOP</a>

View file

@ -1,7 +1,7 @@
The latest iteration can be viewed with: The latest iteration can be viewed with:
```shell ```shell
reveal-md 2024-nedcamp-when-not-a-module-make-and-maintain.md reveal-md 2025-midcamp-when-not-a-module-make-and-maintain.md
``` ```
Press S to open the speaker view to see the notes. Press S to open the speaker view to see the notes.