Welcome back for the anti-penultimate door of the Drupal Advent Calendar.
Today I want to talk about a module that I think will be a big part of Drupal’s future, even though I wouldn’t recommend installing it on production sites quite yet.
The module is called Project Browser, and as its name implies, it allows you to look for Drupal projects from within your site.
Previously, in order to find modules or other projects to include in your site, you needed to search the projects area of the Drupal.org website. You’d then need to add them to your site. In the old days this involved downloading, which might also require dependent libraries to be downloaded. More recently, the Composer dependency manager handles finding dependencies, and ensuring everything is compatible. However, it does require the command line to use, which can be challenging for new users.
This is somewhat at odds with many other content management systems, many of which allow you to see what add-ons are available from within the website’s user interface, and add them to the site at the click of a button.
This is what Project Browser aims to do.
For starters, it displays projects in a more user friendly cardfile display. Clicking on a project title displays details, similar to the project page on Drupal.org.
By default, clicking an “Install” button will display the commands to install a project from the command line with Composer. However, there is an optional experimental feature you can enable that allows you to install modules directly from the browser.
With this enabled, you can browse projects, and click the install button, and the project will be installed and activated on your site. And, since it uses Composer, any dependencies will automatically be added. For example, the Pathauto module requires the Token module. If you install Pathauto, Token will automatically be installed if it’s not already present.
I think that this will be a great feature for small sites and hobbyists in the future. One of the main complaints from people who aren’t comfortable with the command line is Composer. Project Browser will give all the advantages of Composer, but will make it minimal effort to use.
The Project Browser team is also doing a lot of work to tidy up the huge Drupal project repository. One of the areas ongoing is an effort to give the most popular projects distinctive icons and more meaningful descriptions. There is also a reorganisation of the Drupal project categories, reducing the list from over 50 entries to around 20. Some of the old categories relate to projects that no longer exist, and many of them are ambiguous, so a clean-up is overdue.
While I wouldn’t recommend installing Project Browser on your production site, there are several ways you can try it out.
One of the easiest ways is to use DrupalPod, which I covered in yesterday’s entry. There is a direct link to open a DrupalPod instance on the Project Browser home page. This works fine for the basic browser. However, if you’d like to try out installing through the UI, you need some additional steps, which can be found in the documentation.
If you’d like to try out in a local environment, there is a guide to install in DDEV.
While talking about Project Browser, it’s also worth mentioning the Automatic Updates project. While this is a separate project, the two are quite closely related, and both are important if you want to get the benefits of Composer without having to use the command line. As the name implies, Automatic Updates will keep your site updated when new Drupal versions are released. Initially, it only covers Drupal Core updates, but it is expected that eventually it will also cover updates to contributed modules.
Both of these projects are initially “contributed” modules, meaning they are not part of the core Drupal project. However, it is expected that they will be moving to the core of Drupal in the near future, possibly as soon as Drupal 10.1, which should be released in mid 2023.
And that’s door number 22. Only two left to open. I wonder what will be in them…