One of the things that #2936020-113: Add Contribute module as a dependency brought up that out-of-the-box, you have to "Insert your drupal.org user id here" before any real functionality is presented.
While this makes sense for a local dev, it doesn't really have much use on production sites (that may be owned by an org, not an individual).
Instead, I think one of the "default" displays should show just how many people actually contribute to making their site actually function, e.g. "# people helped build this site" (or some other verbiage if people get touchy about who actually "built" it, meh).
This could easily be obtained by querying the site's installed projects and pairing that with the maintainers of said projects.
Granted, this list would likely be extensive, so a "total" should probably be displayed for the initial "card" and when clicked, a modal is displayed with a list of all enabled projects and their maintainer's user pics.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screen Shot 2018-02-13 at 6.08.21 AM.png | 43.25 KB | jrockowitz |
Comments
Comment #2
markhalliwellFrom https://www.drupal.org/drupalorg/docs/api:
Maintainers from each project can be retrieved using the following URL:
https://www.drupal.org/project/[project ID]/maintainers.jsonWorks with any type of project, e.g.
https://www.drupal.org/project/drupal/maintainers.json
https://www.drupal.org/project/contribute/maintainers.json
https://www.drupal.org/project/webform/maintainers.json
https://www.drupal.org/project/bootstrap/maintainers.json
Comment #3
markhalliwellProbably a more appropriate title
Comment #4
markhalliwellYou can get even more detail about a project using:
https://www.drupal.org/api-d7/node.json?field_project_machine_name=[project ID]e.g.
https://www.drupal.org/api-d7/node.json?field_project_machine_name=drupal
https://www.drupal.org/api-d7/node.json?field_project_machine_name=contr...
https://www.drupal.org/api-d7/node.json?field_project_machine_name=webform
https://www.drupal.org/api-d7/node.json?field_project_machine_name=boots...
Most notably, perhaps
flag_project_star_usermay help add some value to this as well, e.g. "X Maintainers, X Followers"Comment #5
jrockowitz commentedOrganizations are also able to enter their name.
I agree on a production website, entering an organization is going to the preferred and more common. Maybe we should consider changing the "Drupal.org Account" header/section to "Drupal.org Organization Name or User Account" and update the description and even have the 'Organization' account type as the default radio option.
For pulling in a project's maintainer data, we are currently experimenting with getting this data from the installed project's composer.json file. The list of maintainers (aka authors) provided in the composer.json file is more accurate because it is release/version specific, supports custom ordering of maintainers, and roles. The only immediate problem is most projects are not providing a composer.json file and it is being generated by Drupal.org. We should be able to populate the generated composer.json file with a project's maintainer.json file.
Below are links to the Webform module's and Bootstrap composer.json and maintainers.json files.
https://cgit.drupalcode.org/webform/tree/composer.json
https://www.drupal.org/project/webform/maintainers.json
https://cgit.drupalcode.org/bootstrap/tree/composer.json
https://www.drupal.org/project/bootstrap/maintainers.json
I like the idea of using a project's local composer.json file because it will eliminate having to pull remote data from Drupal.org for every project. We can have projects add '_extra' data to the JSON including custom message, funding, sponsoring organizations, etc... Another great thing about using composer.json is if people don't want their name displayed they don't have to include it. They can even decide to list their organization as a maintainer (aka author).
Comment #6
markhalliwellYes, but I was more focusing on the fact that you have to put something in before you really see anything of value. IMO, supplying a username or an org name should likely be supplemental information, not required.
Sure! That totally makes sense and I completely forgot composer.json had this.
Perhaps, as a fallback, it queries d.o via the API?
Comment #7
markhalliwellI also really like this idea as we'll need something along those lines for
#2554199: Bootstrap 4.
Comment #8
jrockowitz commentedI think we have to try to avoid having a lot of queries to the D.O APIs, this is the main reason I turn off the update.module. My hope is that getting a user's profile picture would be the only API call. @see #2942246: Provide a canonical URL for retrieving a Drupal.org user profile picture
For now, maybe we should swap the order of the 'Community Information' rows and put 'Drupal Core Maintainers & Coordinators', etc.. first.