Problem/Motivation

Many projects on d.org have formed ecosystems around themselves, because they are extensible. Eg: Views, Drupal Commerce, Domain Access, Flag, and also themes such as Zen.

Sometimes these projects provide a list of related or helper projects in their project page, or in documentation pages, but these often end up being out of date because the people who maintain the ecosystem projects don't know about them or don't have access.

A partial solution to this has been the inclusion of some ecosystem terms in the 'Modules categories' taxonomy, but this has problems of its own:

- need to add more terms as more projects develop an ecosystem
- terms don't link back to projects

Proposed resolution

Let projects link to other projects, by adding an entity reference field to project nodes that lets you select an ecosystem hub for the project.

So for example:

- The EVA project would link to Views, to indicate that it is an ecosystem module for Views.
- The project page for EVA would have a link to the hub projects it links to, in this case Views
- The project page for Views would have a link to a view listing the ecosystem projects. This is similar to the change records link.

Some screenshots from the latest patch (as of march 2014):

Hub project. This has a link in the Resources block to a view listing ecosystem projects. This works the same as the change records link.

The view of ecosystem projects for the hub project. This can obviously be designed to show more information about each project in the list.

Extending project. This links to the hub projects it references.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

I think this is an excellent idea. It could go a long way toward making finding contrib modules easier.

RobLoach’s picture

I find if we make a more conscious effort of hijacking body tags like what we did with #D7CX, it might become easier to find similar modules. Solr is quite amazing, we should take advantage of it. You can effectively tag your own project with your own custom eco-system tag by just sending them to...
http://drupal.org/project/modules?solrsort=sort_title%20asc&display=tabl...

joachim’s picture

Freeform tagging has its uses (for loose community initiatives like D7CX), but I think for this a structured approach has advantages. Blocks on hub projects would be made automatically, and in due course could be ordered by some sort of project metric when we have them.

We also have the components we need to build this already running on d.org: flag and nodereference.

joachim’s picture

Status: Active » Needs review
FileSize
15.82 KB

Here's a patch to perhaps get a bit more discussion on this.

What's in it:

- new feature containing a nodereference field on project nodes and a view of ecosystem modules
- link to a hub module in the project metadata
- link to the view of ecosystem modules in the 'project resources' block

What's not in it yet:

- flag on project nodes to mark them as hubs
- view to limit the nodereference field candidate items

joachim’s picture

I've put in a request for a dev sandbox to work on this: #1488372: I want a drupal.org development site for working on project ecosystem links.

drumm’s picture

We now have http://drupal.org/project/project_dependency on Drupal.org, which keeps a table of dependencies like

mysql> SELECT * FROM project_dependency_component WHERE component_id = 24;
+--------------+-------------+--------+--------+----------------------------------------------------------------------------------------+
| component_id | release_nid | name   | title  | description                                                                            |
+--------------+-------------+--------+--------+----------------------------------------------------------------------------------------+
|           24 |     1139480 | a_hole | A-Hole | See if your JavaScript follows good code isolation and dependency injection practices. | 
+--------------+-------------+--------+--------+----------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM project_dependency_dependency WHERE component_id = 24;
+---------------+--------------+---------------+----------+----------+----------------------+-----------------+
| dependency_id | component_id | dependency    | core_api | external | external_release_nid | dependency_type |
+---------------+--------------+---------------+----------+----------+----------------------+-----------------+
|            20 |           24 | bad_judgement | 7.x      |        1 |                    0 |               0 | 
+---------------+--------------+---------------+----------+----------+----------------------+-----------------+
1 row in set (0.00 sec)

I think this goal might be achieved by exposing this data on module pages, #1299240: Expose the dependencies on the project page. That would avoid additional info for project maintainers to update and remove the need for manually-updated lists often seen in the project description. Here is a quick example, our top 10 depended-on modules:

mysql> SELECT dependency, count(*) c FROM project_dependency_dependency GROUP BY dependency ORDER BY c DESC LIMIT 10;
+------------+------+
| dependency | c    |
+------------+------+
| views      | 4786 | 
| taxonomy   | 3387 | 
| content    | 3043 | 
| ctools     | 2220 | 
| features   | 1896 | 
| menu       | 1193 | 
| strongarm  | 1153 | 
| token      | 1140 | 
| search     | 1069 | 
| comment    | 1044 | 
+------------+------+
10 rows in set (0.57 sec)
joachim’s picture

That sounds pretty amazing. It would certainly be great to have automatically generated dependencies.

However, I wonder whether the list of dependents won't be a bit too noisy.

For example, Commerce depends on Entity API. But I wouldn't say it's one of its 'ecosystem' module. To my mind those are modules that specifically extend or build on it, such as EntityReference. Similarly, CTools is going to have a ton of dependencies, whereas I don't think there's many modules I'd consider to be part of a CTools ecosystem.

joachim’s picture

Here's a quick example on the dev sandbox. The user/pass is 'drupal'/'drupal'.

- Ecosystem child: http://ecomod-drupal.redesign.devdrupal.org/project/img_assist (look in the 'Project Information' section)
- Ecosystem parent: http://ecomod-drupal.redesign.devdrupal.org/project/image (look in the RH sidebar)

I'd welcome input on better labels for these! Also, any ideas on sort order for the block when there are more child modules? I plan to show just 10 and then link to a page with more.

Also, at the moment the block on the parent project is made with a view. Given d.org doesn't have Context module, that means the view gets loaded and executed on every single node -- even if it's find there are no results -- which doesn't seem good for performance. What would the d.org maintainers recommend out of:

- having PHP code for block visibility to only show on project nodes
- coding the block in a module to then output the view with views_embed_view()
- coding the block in a module with an SQL query
- something else I've not thought of...

joachim’s picture

Also, I've made the noderef field a simple autocomplete that can reference any project field. That's different from the original proposal that projects would have to have a flag to be considered as possible ecosystem hubs (=parents).

I can see on advantage to doing it this way is that you don't have to ask the maintainer of a module you want to link to to flag their module; it could take weeks and it doesn't improve the current workflow of asking a project maintainer to link to your module from theirs.

The disadvantage is that with so many module, the autocomplete is pretty difficult to use. I typed 'Image' and several things came up, none of them actually 'Image' module!

xjm’s picture

I definitely think "Ecosystem" is probably not the right word. :) That does not indicate to me what the relationship is at all, and in fact makes me think these are modules that have something to do with literal ecosystems. (Actually the metaphor doesn't even fit very well.) We want something that clearly indicates the relationship between these modules, and if it's not "modules that extend this module" or "modules that depend on this module" (as joachim implies in #7), then what is it? I don't even really understand, even having read this issue.

Also, it seems to me that it would make sense to include the sidebar on the "child" module as well. Finally, what happens when the ecosystem is overly large? Do you display only the most popular modules, maybe with a "more" link?

joachim’s picture

Thanks for taking a look! :)

I routinely talk about modules in the 'Views ecosystem' or the 'Drupal Commerce Ecosystem'. The phrase 'Drupal ecosystem' comes up a lot on Google, as well as the occasional meaning for a particular module, eg 'Media ecosystem' here: http://groups.drupal.org/node/145074.

But it's definitely not as widely used as I thought, so maybe it's mostly a pet usage of mine :)

Maybe a simpler word like 'groups' would convey the meaning, but then that butts against 'Module categories'.

> Also, it seems to me that it would make sense to include the sidebar on the "child" module as well.

I wanted to put the parents list alongside Module categories and other metadata about the project. Whereas the list of children is more ancillary data.

Also, if both blocks are in the same place it risks being confusing for navigation, as you've got links that take you in potentially different directions that are in the same place.

> Finally, what happens when the ecosystem is overly large? Do you display only the most popular modules, maybe with a "more" link?

Yup, that's what I'm thinking. Though I've not done that part yet, as it depends on finalizing how the block should be built. Also, I'm not sure what to use for a sort order.

joachim’s picture

> if it's not "modules that extend this module" or "modules that depend on this module" (as joachim implies in #7), then what is it? I don't even really understand, even having read this issue

It's the modules that extend this module.

Here is an example -- I just overheard on IRC someone being told about webform. Someone else chimed in to say that they also probably need http://drupal.org/project/webform_validation and http://drupal.org/project/webform_conditional.

This is what I would like the list of 'ecosystem modules' to include: modules that fairly specifically extend the one you're looking at.

For webform, I would also include http://drupal.org/project/webform_confirm_email. I'm not sure about whether http://drupal.org/project/select_or_other would count, but it is rather useful when you're making webforms.

The aim of this is to answer such questions as 'I've got module X -- what else can I do with it?' or 'I've got module X but it doesn't quite do what I want -- is there anything that would add that functionality?'

joachim’s picture

Here's various examples of handrolled equivalents of this I've recently seen on project pages:

bean

facetapi

simplenews

My aim with this feature is to take some of the burden off the maintainer of the 'hub' module to keep these lists up to date, and to provide consistency to users looking to find further modules.

sun’s picture

Our project pages are too cluttered and overcrowded with "related" information today already.

Why don't we introduce a new tab "%project extensions", which contains the full list of dependent projects, and which thus has the possibility to show more information about each dependent project?

As you know, the project titles are not always really clear, and you need to at least read the teaser/summary to understand what it really does.

A separate view also allows to filter by

- core version
- possibly even major version of the parent project
- project category
- sandbox/full-projects
- etc.

batsonjay’s picture

Frankly, I think this goes beyond "Ecosystem" to just "exploring / finding modules" in general, as in this discussion.

I have a couple of comments:

  • The existing taxonomy filters available at /project/modules are just too simplistic. Selecting any one of the terms often still makes me review hundreds, if not thousands of modules.
  • I often want > 1 term to filter on, e.g. "User access & authentication" AND "Third-party integration" AND Utility. Using multiple terms with booleans would narrow my search dramatically.
  • I want a better manner to review listings (as discussed in the link above).
  • Folksonomy/tagging - vs. formal taxonomy - seems untapped. Social tagging would best leverage the "Drupal way", and get community participation to add value (to classification). And a richer, wider set of tags seems like it would add value. (It could, for example, solve the "ecosystem" problem being referred to in this thread.) Yet the potential for lots of almost-identical tags remains; though one solution might be to invent some kind of workflow that routes new tags through maintainers before making them active.

This problem seems to beg search-based navigation using Solr; it would not only provide a sophisticated way to handle the filtering described here, it could also bias results based on # installs, etc. My favorite example of search is still the search results page at Kayak; I'd kill to have a metaphorically-similar interface for finding modules.

dww’s picture

Re: #15: The project browsing pages are entirely solr-based search. I'm not sure what you want that you don't have in that regard. It already does bias results based on # of installs (that's the default sort order). Maybe we did too good of a job making it not look like Solr so you didn't even recognize it. ;)

But honestly, most of what you're talking about is off topic for this thread. We don't need yet another generic "make it easier to find modules" discussion here. joachim has a specific proposal to address a subset of the problem. Let's use this issue to discuss the merits of that proposal, instead of dragging the entire debate back in to each discrete issue. We can't make actionable progress if each time someone proposes something concrete we use it as an opportunity to discuss everything all over again. We need achievable things to implement, or we're just talking in circles. Yes, we need to step back and look at the big picture, too, but that's what venues like g.d.o are for. This specific issue is a poor place to discuss the whole picture. So let's not. ;)

Back to the specific proposal here -- we do have the project_dependency data now, which parses all the .info files of everything packaged on d.o to record dependencies between projects. There's already a proposal for displaying that info on project pages over at #760890: Display module dependencies on project pages. So, if that's all we're going to gain from this, we should just close this as a duplicate. However, I get the sense joachim wants something more than that. Yet, my concern is that if we do something other than the auto-populated dependency listings, it's going to require human intervention and we've already got resource problems with not enough volunteers to deal with stuff like this. I'm reluctant to put energy into a system that depends on lots of human effort.

So, joachim, can you clarify what's different about this issue from the info we'd gain automatically via #760890: Display module dependencies on project pages? Is the difference worth the effort? Should we just close this and focus on #760890 instead?

Thanks,
-Derek

joachim’s picture

I feel this proposal would provide more refined information than a mere list of dependencies/dependents. I think I've explained that above.

I also feel it would reduce human effort. Here's why.

Current situation is we have hub modules such as Views, Webform, Flag, or Simplenews. We have one of:

- hub module maintainer chooses to keep an ecosystem list in the project node body. Maintainers of ecosystem modules have to file an issue saying 'please add my module to the list' for the hub module maintainer to add it.
- hub module maintainer keeps an ecosystem list in the project documentation. Maintainers of ecosystem modules have to discover this exists.
- hub maintainer does nothing.

Proposed situation:

- hub module maintainer needs to do nothing
- ecosystem module maintainer needs to fill in an autocomplete noderef in their project form.

So we save time for the hub maintainer, who is busy enough maintaining a popular module, and we simplify the task for the ecosystem module maintainer, who saves a couple of minutes faffing with writing HTML links (which personally is something I find really fiddly but maybe that's just me).

dww’s picture

Alternate proposed situation:

Let a robot fill in these "noderef" fields automatically.
-- 1-time human effort to teach the robot what to do, then 0 effort ongoing.
-- Equivalent or possibly less 1-time human cost than the proposal here.

I don't really understand why making humans do it provides "more refined info" other than the fact that in practice, only a small % of "ecosystem module maintainers" will actually use this feature and provide any data at all.

Maybe you're worried about the fact that 1000 modules depend on views, so you don't want an automated list. Fair enough. But "more refined" is a fancy (and IMHO misleading) way of saying "incomplete." In principle, nothing would stop all 1000 dependencies of views to use this feature. So AFAICT, the only difference between letting robots do this automatically and correctly, and asking 1000s of humans to take action, is that we know the robots will do a more thorough and complete job.

joachim’s picture

> that 1000 modules depend on views, so you don't want an automated list

Yes, that.

I think I've given examples of this in http://drupal.org/node/1323826#comment-5950436 above, and it really does seem to be something that maintainers currently do and I know from experience it's something that extremely useful. But I don't seem to be managing to convince anyone here, so I might as well give up.

dww’s picture

I'm not trying to discourage your initiative here, sorry if that's the result. Please don't give up just because I'm asking questions and pushing back a bit. I'm only trying to figure out why we should invest development time in this feature instead of the automated one. I understand people do this already via manual effort. I do it myself at the signup module project page. That's not what I need to be convinced about. ;) I need to be convinced why partial results that have to be manually provided by maintainers "in the know" enough to actually use the new feature are better than automated results. If the only answer is "scale", then I say "provide a useful default sort on the automated results". For example, order those by # of site installs using the module. So, you still would see (via a pager) all 1000 things that depend on views, but the top of the list would be the more popular (and presumably, therefore useful/working) dependencies.

Thoughts?

Thanks,
-Derek

dww’s picture

p.s. Jumping off from what both sun and batsonjay have said, maybe this /project/[whatever]/extensions page is just a pre-filtered Solr search interface, much like the module browsing page, except restricted to only display projects that include a module that depends on the [whatever] project. So, we'd just have to inject dependency info into the solr doc for each project node over at #760890: Display module dependencies on project pages. Then you could have all the same fancy sorts/filters/search goodness, but only on the subset of projects related to [whatever]. That seems like it'd be pretty useful, and would require very little work (since we've already got all the plumbing in place for this stuff via the project solr module).

If that's a better solution to what's proposed here, let's mark this duplicate, copy this proposal over to #760890, and start actually making progress on that.

If what's proposed here is better, I still need to be convinced. ;)

Thanks!
-Derek

sun’s picture

@joachim: You totally convinced me. :) Was merely unhappy about the location of where it gets output in the mockups.

@dww: I don't think that module dependencies deliver the picture that @joachim is aiming for here. What about optional module support, for example? (i.e., there's no dependencies[] in any .info file at all. Perhaps there's a module_exists(), but not necessarily. Many help enhancements and integrations can be achieved by implementing hooks or alter hooks only and those use magic naming as you know.)

sun’s picture

That's not to say that machines couldn't be used to provide suggestions based on automatically parsed stuff.

But, as a project maintainer, I definitely know that there can be other projects/modules, which you explicitly want to "discourage" and not recommend to anyone. Because they might be deprecated approaches (but still popular), or because that other projects' functionality has been merged into your project. Or whatever.

I definitely like the bi-directional concept that @joachim came up with here, and I like the human curated part of it.

joachim’s picture

Could we actually see a list of the 1000+ things that depend on Views? Because my main objection is just a hunch that most of that's going to be irrelevant, even if ordered by various metrics, but I could be wrong.

dww’s picture

I don't quickly grok the schema from project_dependency. Seems like a fairly nasty query to answer your question, and I don't have time now to sort that out. Feel free to ping me in a few days if I haven't replied here. You might also have luck asking over at #760890: Display module dependencies on project pages since in theory the project_dependency maintainers would see it there and they might more quickly be able to produce such a list.

joachim’s picture

Here's a patch on 6.x-3.x and some screenshots of what it does.

Hub project (ignore error messages, there's tons of stuff missing from my local d.org test site)

ecosystem-hub-project.png

Ecosystem project:

ecosystem-ecosystem-project.png

View of ecosystem projects:

ecosystem-projects-view.png

One more thing to figure out: currently it's set up to allow linking to anything as a hub. But that means every project gets the 'ecosystem modules' link, which in many cases leads to an empty view.

I'm not sure whether that's a good flexibility to have, or whether we should have a boolean field on a project so you have to explicitly make it an hub project. I guess it means that a project maintainer has to be bugged to enable it, but just the once :)

On the other hand, if anything can be a hub, then it allows more linking. But we should perhaps consider checking for results before outputting the link to the view, so users don't follow a link to an empty list. I'm not sure what the performance implications would be of this though.

Susan Rust’s picture

I'm very interested in helping tackle this problem. As a proven non-engineer architect, site builder, content strategist, and former Drupal shop owner, I've struggled with this part of Drupal since 4.7.

We can anticipate over 20,000 modules in the near future. We may find Drupal adoption dropping because module usability is very unwieldy when checking out Drupal functionality for the first time (new customers). Module search for customers, is too daunting to comprehend. For developers, it's too time-consuming. You could have built the module before finding, reading, downloading and testing 15 variants. And who has time to keep up?

The search capabilities can certainly leverage taxonomy / solr, etc. but it has to be a multi-dimensional matrix. It has to take into account all types of users, all types of modules, all the Drupal variants (5,6,7,7), the status of the module (active, not active), complexity, configuration, dependencies, usage, critical bugs, etc.

I definitely agree that free tagging should not be used, the variants on terms will balloon and make more of a mess. This is a library of 20,000+ items and good classification, cross-referencing with an eye to all the stakeholders will be very useful.

Of course this ties back to a bigger conversation too about the heavy-lifting module maintainers take on to make Drupal better. I bring that up just to say thank you to those brave and brilliant folks. Hope this is helpful, thanks to everyone for their passion for making module search better.

joachim’s picture

Change the summary as I don't think a flag is the way to go, but I do think we need to mark hub projects:

1. To reduce the list of things you can point to
2. So we don't need to query the ecosystem view on all project pages (which may be empty). It's only queried and the block is only shown if the current project node has the boolean field set to say it's a hub node.

That said, my motivation for working on this has totally flagged. I can't understand why so few people seem to think this is a good idea.

andypost’s picture

+1 to flag eco-projects and also +1 to relations for projects

kylebrowning’s picture

+1

cweagans’s picture

Title: make it easier to identify and discover ecosystem modules » Make it easier to identify and discover ecosystem modules
Version: 6.x-3.x-dev » 7.x-3.x-dev

At this point, this is probably something that will have to wait until after the Drupal 7 upgrade.

Also, +1 to what joachim is suggesting. Would be a very nice thing to have.

cweagans’s picture

Issue summary: View changes

mentioning Flag and Zen, change use of flag to a boolean field

mgifford’s picture

So the Drupal 7 upgrade has happened. I definitely agree with @joachim's suggestion!

mgifford’s picture

AaronBauman’s picture

comment deleted

joachim’s picture

This issue isn't about submodules.

> Provide URL aliases to project page for all sub-modules (e.g. d.o/project/uc_cart redirects to d.o/project/ubercart instead of 404).

uc_cart is a submodule of ubercart: it is a module within the git repo and tarball download for ubercart.

That is not what is meant here by ecosystem modules. An example of an ecosystem module of Ubercart is https://drupal.org/project/uc_worldpay. It is a different project, but it extends Ubercart.

AaronBauman’s picture

comment deleted

mgifford’s picture

It's re-opened. Sorry for the confusion.

joachim’s picture

Here's a patch.

And some screenshots:

Hub project. This has a link in the Resources block to a view listing ecosystem projects. This works the same as the change records link.

The view of ecosystem projects for the hub.

Extending project. This lists the hub projects it references.

joachim’s picture

FileSize
14.37 KB

Updated patch: sets the breadcrumb on the list of ecosystem projects.

joachim’s picture

Issue summary: View changes
joachim’s picture

Issue summary: View changes

Added recent screenshots to the issue summary.

mgifford’s picture

I applied the patch here: https://search_api-drupal.redesign.devdrupal.org/

Went to enable the feature:
/admin/structure/features

I can then go to https://search_api-drupal.redesign.devdrupal.org/ecosystem-projects/path...

But I can't find the ecosystem links on https://search_api-drupal.redesign.devdrupal.org/project/libraries

I'm not sure what I'm missing.

I've attached a patch which works better (I think) with the devww environment. It should be identical though to what you've provided.

mgifford’s picture

[mgifford@devwww drupalorg_user]$ drush features-update drupalorg_ecosystem
Module appears to already exist in sites/all/modules/drupalorg/features/drupalorg_ecosystem
Do you really want to continue? (y/n): y
Created module: drupalorg_ecosystem in sites/all/modules/drupalorg/features/drupalorg_ecosystem [ok]

Well, that didn't seem to be the issue. I'll try and reach out on IRC.

helmo’s picture

This could be a partial alternative to #480356: Implement Community Tags for d.o projects, so a late +1 from me.

The links to the dev sites are outdated... any chance of getting a fresh dev site for this?

joachim’s picture

> The links to the dev sites are outdated... any chance of getting a fresh dev site for this?

There's a separate issue queue to ask for dev environments. If you could arrange to get one set up, that would be great!

Here's a reroll of patch #39.
(#42 is identical according to git, just rolled against the Drupal root rather than the module root.)

helmo’s picture

The content type for project has been split ... I've adjusted to add the ecosystem field to project_module and project_theme.
Updated the patch, I'm working in a sandbox ... https://www.drupal.org/sandbox/helmo/2771139 on the feature/ecosystem-1323826-HEAD branch.

Test plan: (executed on https://eco-drupal.dev.devdrupal.org/)
- apply a patch from this issue
- enable the feature 'drupalorg_ecosystem'

I added some demo content:
- https://eco-drupal.dev.devdrupal.org/project/hosting_git
- Edit
- add "Hostmaster (Aegir) (195997)" in the Ecosystem field

- https://eco-drupal.dev.devdrupal.org/project/eldir
- Edit
- add "Hostmaster (Aegir) (195997)" in the Ecosystem field

TEST:
- View https://eco-drupal.dev.devdrupal.org/project/hostmaster to see the extra resource link
- View the new page: https://eco-drupal.dev.devdrupal.org/ecosystem-projects/hostmaster

joachim’s picture

Looks good to me.

And thank you so much for working on this!

drumm’s picture

I'm concerned about introducing the "ecosystem" terminology here. Does that broadly communicate the concept to Drupal developers? To Drupal developers from many language backgrounds?

joachim’s picture

I think the expression 'Drupal ecosystem' is used a lot (http://polycotassociates.com/blog/leveraging-drupals-open-source-ecosystem), though it can sometimes also be used to refer to the community as well, or the agencies that work with Drupal (https://www.ostraining.com/blog/drupal/mergers/).

More specifically, the same meaning we're using here, to mean the modules that work with and extend a particular module, has been in use for some time:

- 'Introducing the digital commerce ecosystem' - http://szeged2014.drupaldays.org/program/sessions/introducing-digital-co...
- 'The goal of the Commerce 7.x Sprint is to provide a common community push to sprint on the Drupal Commerce ecosystem at large' - https://drupalcommerce.org/blog/40232/drupal-7-commerce-sprint
- 'I’m going to assume you are experienced with building Drupal sites, yet are unfamiliar with the ecosystem around Panels.' - http://chipcullen.com/an-overview-of-the-drupal-panels-ecosystem/ (August 13, 2014)
- 'Drupal 8 and the Panels Ecosystem' - https://events.drupal.org/dublin2016/sessions/drupal-8-and-panels-ecosystem
- 'This would provide readers with a higher-level view of the Views ecosystem.' - https://www.drupaleasy.com/blogs/ultimike/2016/06/deep-dive-views-unique...
- 'Views is not just a contrib module, it is a framework on top of Drupal, a whole ecosystem of modules.' - https://www.drupal.org/project/privatemsg_views
- 'The Flag ecosystem is rather unstable if you ask me' - https://www.drupal.org/node/1812326#comment-9359789

That's quite a few uses I've found quickly with Google, from DrupalCon presentation titles, books on Drupal, blog posts, and issues here. They're all using 'the PROJECT ecosystem' to mean the same thing.

realityloop’s picture

I asked in #infrastructure about doing something like this and found this issue after discussion with Mixologic, I think the discussion is worth pasting here:

realityloop: is there any way to search modules on d.o based on their dependencies?
Mixologic_: what sort of search? do you want to know what depends on a module, or what a module depends on?
realityloop: so essentially I'd like an easy way to search for all modules that depend on context for instance
Mixologic_: wonders what that query would entail
realityloop: it would have to inspect info files I imagine.. possibly not something thats possible..
Mixologic_: no, its possible. project_dependency already does that so we can pull in dependencies for the testbots
Mixologic_: so the query is made more difficult by the fact that that sql is a bummer for storing bidirectional relationships
Mixologic_: we've got "what does this module, in this particular release, depend on" in the database
Mixologic_: so to get the inverse, which is "which modules depend on a module" means we need to figure out if we just want the most recent release of module, or if it has ever relied on context.
Mixologic_: and to top it off, you probably want to know which *projects* most recent release contain a module that depends upon context..
realityloop: would be nice :)
realityloop: would be awesome to have a view that showed all dependent modules on a projects page. would help a lot with visibility of modules you might want to use in a project..
Mixologic_: the other challenge is the conflict in the data model between projects and modules. Should we show other projects that contain a module that is dependent upon, say, context_ui, if it existed?
realityloop: it becomes a possible rabbit hole.. but gut feeling would be yes if it was possible. I'd be happy to help sprint on it in the afternoon at Dublin sprints, I'm running the first time sprinters workshop in the morning
Mixologic_: So how about "show project names that have a release containing a module that is dependent upon any module in the project being displayed" ?
realityloop: that seems like what would be ideal
Mixologic_: is hacking together a query
Mixologic_: couple of other things to think about. We've got drupal modules, and we've got composer dependencies as well, so we both want to display "what this project/module depends on" as well as "what depends on this project module"
Mixologic_: https://gist.github.com/anonymous/73445728b98ae7c2469d327041402e7f save this gist as a starting point to get the necessary data
realityloop: thanks.. I'll create an issue about it too, do you mind me pasting copy of log here into the issue?
Mixologic_: no problem
Mixologic_: one thing to consider is a UX for popular modules. i.e. Context has 187 modules that list it as a dependency: https://gist.github.com/ryanaslett/d6c0bb46006630ed4b48b1453a77af27
realityloop: might want to show top [n] based on usage, with link for more
Mixologic_: heh. I know just the joins to make that happen.
Mixologic_: there may also already be an issue. I know that *certain* users can see the project dependency data on release nodes.
realityloop: this looks like it's close to my thinking one it's utility https://www.drupal.org/node/1323826
Mixologic_: speaking of that one, project_dependency historically has only kept parts of the .info files. I recently had us add the "package" line into them
Mixologic_: So the "package" line that allows modules on the module page to group together, we have that data now in our database, so we can start to use that too.
Mixologic_: so restricting to just things that call themselves part of the "Context" package, we end up with only four projects: context, context_profile_role, context_flag, context_panels_condition
Mixologic_: but that has a lot to do with us not backdating that data.
realityloop: yeah I wasn't after ones that call themselves part of the project.. because that depends on developers selecting that when they make module.. I think dependencies is better as much more likely to be set in a useful way

joachim’s picture

You're not the first to suggest using .info file dependencies to generate this automatically, and I think https://gist.github.com/ryanaslett/d6c0bb46006630ed4b48b1453a77af27 illustrates why that's not the right thing for finding ecosystem modules:

debut_article
delta
ideation
intellitxt

These are in the list, but a look at their project pages shows that they use Context, but they don't extend Context.

helmo’s picture

Thanks @realityloop,

I like the idea of having this automated through dependencies. The new ecosystem field this issue is trying to add would also depend on developers filling it, just like the "package" line in info file.

joachim’s picture

Using the package info file line sounds like it could work, but I don't think it will.

Lots of ecosystem modules will want their own package value, rather than that of their parent.

An ecosystem might contain lots of modules, but having that many modules in the same package in the Extend admin page isn't good UX.

helmo’s picture

Another downside of using 'just' package information is that a module could be part of multiple ecosystems.

drumm’s picture

FileSize
17.48 KB

We lost the dev server to the cloud and I've rebuilt the dev site at https://eco-drupal.dev.devdrupal.org/project/panelizer. The patch also needed a re-roll, which is attached.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good to me.

Would be great to see this get in!

drumm’s picture

I should also mention that the actual deployment of this will have to happen at least after DrupalCon. The way Features gets fields configured involves a lot of field cache clearing one after another. Unchecked, I've seen this take Drupal.org offline for over 30 minutes. That said, it is doable to get this deployed a less-hectic week.

helmo’s picture

helmo’s picture

Maybe we can use the dependency information we have to pre-fill this field for existing projects.

We could query the most recent stable release for a project, and all the projects that depend on that.
@realityloop already made such a query for #760890-32: Display module dependencies on project pages
This would solve the problem of it not being very useful until many maintainers have added ecosystem information, while preserving the freedom tu finetune it for maintainers.

Another nice follow-up would be to add this as a facet on https://www.drupal.org/project/project_module

joachim’s picture

Using dependency information has already been addressed -- see #7. I think prepopulating would add a lot of useless data.

DamienMcKenna’s picture

Bump.

MrPaulDriver’s picture

Yes please.

joachim’s picture

I keep forgetting this exists because it's been dragging for so long.

> I should also mention that the actual deployment of this will have to happen at least after DrupalCon.

Which DrupalCon though? Mars 2057? :p

MrPaulDriver’s picture

It seems so obvious. What can the problem be?

borisson_’s picture

This would a great start to find a way to identify ecosystems. RTBC++

  • drumm committed 0c28104 on 1323826-ecosystem
    Issue #1323826: Only show link to projects that extend if they exist...
  • drumm committed c3629f7 on 1323826-ecosystem authored by joachim
    Issue #1323826 by joachim, helmo, mgifford, drumm: Make it easier to...

  • drumm committed 0c28104 on 1323826-ecosystem
    Issue #1323826: Only show link to projects that extend if they exist...
  • drumm committed c3629f7 on 1323826-ecosystem authored by joachim
    Issue #1323826 by joachim, helmo, mgifford, drumm: Make it easier to...
drumm’s picture

Status: Reviewed & tested by the community » Needs work

I re-deployed this on a fresh dev site, https://eco-drupal.dev.devdrupal.org/, to make sure everything was still working well.

I’ve committed some fixes, including:

  • Re-roll for upstream changes.
  • The field instance configuration was inconsistent between module & theme projects. Form weight was missing from module. Display wasn’t hidden on theme.
  • The View’s empty message wasn’t displaying because it seems it might have been developed outside of a Drupal.org dev site, it had the more modern filtered_html input format (Drupal.org has been upgraded from previous versions, so many of our input format names are numeric).
  • Made the View path more-consistent with the site, project/…/ecosystem
  • Finished moving the code to assign $machine_name
  • Only add the “Projects that extend this” link if there are projects that extend it.
  • Replace a loop since we can use array_column() now.

Still to do:

  • The View’s header is also missing because of input format configuration.
  • This field is only added to module and theme projects. Is this intentional? This could be useful for Community projects as well. In general, we keep all the project content types in sync, except for project_translation, which is deprecated.
  • Write a snippet of PHP to put the new field instances into the “Project classification” field group, which isn’t currently exported into a Feature.

  • drumm committed 973f516 on 1323826-ecosystem
    Issue #1323826 by drumm: Correct input format for View header
    

  • drumm committed 022b079 on 7.x-3.x, dev
    Issue #1323826: Put module categories field next to the future ecosystem...
drumm’s picture

Write a snippet of PHP to put the new field instances into the “Project classification” field group, which isn’t currently exported into a Feature.

foreach (['project_module', 'project_theme'] as $project_type) {
  $groups = field_group_info_groups('node', $project_type, 'form', TRUE);
  if (isset($groups['group_project_classification'])) {
    $groups['group_project_classification']->children[] = 'field_project_ecosystem';
    ctools_export_crud_save('field_group', $groups['group_project_classification']);
  }
}

  • drumm committed 0c28104 on 7.x-3.x, dev
    Issue #1323826: Only show link to projects that extend if they exist...
  • drumm committed 973f516 on 7.x-3.x, dev
    Issue #1323826 by drumm: Correct input format for View header
    
  • drumm committed c3629f7 on 7.x-3.x, dev authored by joachim
    Issue #1323826 by joachim, helmo, mgifford, drumm: Make it easier to...
drumm’s picture

Status: Needs work » Fixed

This has been deployed.

tim.plunkett’s picture

Status: Fixed » Needs work

Tested this out, and had some issues.

I went to http://www.drupal.org/project/views_field_view and added it to the Views ecosystem.
After saving I see Ecosystem: Views on the project page

On the Views project page, in the right sidebar, I see Projects that extend this
Clicking takes me to https://www.drupal.org/project/views/ecosystem

Which lists Views as the only module.

Adding another module (https://www.drupal.org/project/views_filters_summary) does not change the ecosystem page, it only lists Views.

drumm’s picture

Status: Needs work » Fixed

I cleared the Views cache and this seems to be fixed.

tim.plunkett’s picture

Confirmed that it now works as expected, thanks!

gnikolovski’s picture

I tried adding my module https://www.drupal.org/project/facets_block to the Facets ecosystem, but I can't find the Facets module in the Ecosystem autocomplete field. Am I doing something wrong?

DamienMcKenna’s picture

Confirmed what @gnikolovski mentioned, the autocomplete likes to show other suggestions even when one matches exactly what you typed.

pcambra’s picture

The same happens for Devel ecosystem.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

MrPaulDriver’s picture

Firsty, It would be good to see this issue reopened by a maintainer as it is of ongoing interested to the community.

Secondly, I'd like to add a feature request for some filters to be added to the ecosystem listings so that it is possible separate results by major drupal version.

Thirdly, the ecosystem lists do not seem to be complete (as mentioned by others). Take Commerce for example. The results suggest that there are approximately 80 related projects, when in fact there are many more. Commerce for Drupal 8 has more than this number of payment service providers alone.