Each day, more Drupal 7 modules are being migrated to Drupal 8 and new ones are being created for the Drupal community’s latest major release. In this series, the Acquia Developer Center is profiling some of the most prominent, useful modules, projects, and tools available for Drupal 8. This week, a personal favorite: Coffee.
Michael Mol, michaelmol on Drupal.org, has been using drupal since 2007. He’s the co-owner of the Rotterdam-based online agency Immer. I particularly like Immer’s slogan: “The human side of code,” for me, it reflects what’s most important in Drupal overall. Michael’s company “wants to make a connection between the client and technology, and a human-friendly company where we can all focus on the most important things in life.”
What does the Coffee Module do?
Coffee helps you navigate by keyboard in Drupal. Pressing Alt+d brings up a search box. Start typing and Coffee searches menus (you can configure which menus Coffee searches), admin page titles, and URL paths on your site, and Coffee presents you a list of one or more results. Choose a result with the arrow keys and jump to it by hitting enter. Furthermore, using the :add command, I can go straight to the content creation page for a specific content type and Coffee is extensible to include anything you need to get to quickly in your Drupal site. Michael explains, “This allows the you to find configuration pages and visit them at warp speed without using your mouse or trackpad.”
I am a big fan of keyboard shortcuts. I love the feeling of really getting into the flow and getting things done; for me that really comes when I can keep my hands down and moving. So in any app I use regularly, you’ll see I use as much keyboard as possible.
Like many Drupal power-users, this as-much-keyboard-as-possible style extends to navigating our Drupal sites. We know all the admin URLs for everything we do on a regular basis. To create a blog post, do we click through all this: Content > Add Content > Blog? No! We go straight to the address bar and whip out sitename.com/node/add/blog, of course!
Michael Mol is like me in this regard, too. He explained to me that the Coffee Module was created in when Drupal 7 was released. “I was frustrated with all the changed paths. I couldn’t just go to where I needed to via the address bar in my browser. Taking inspiration from Alfred, the application I use on my Mac to start applications and do system tasks, I built a tool that does in Drupal what Alfred does on a mac: With a couple of keystrokes I can get to anywhere on my site, including admin pages and content creation forms.” With the module installed on more than 13,000 websites, many of you agree with us on the utility of keyboard shortcuts!
Why is this important?
Hit Alt+d, type, go to page! The URL paths in Drupal 6, 7, and 8 are quite different from one another. When you are developing or working in the backend of sites in multiple versions of Drupal, Coffee lets you search for the configuration pages you need without needing knowledge of the specific URL structure.
“Coffee saves time and frustration for developers working on multiple versions and sites, as well as the content and other teams who work in a site’s backend every day. Once you've used Coffee, you really miss it when it's not installed.” - Michael Mol
Coffee in action
Wait, why Coffee?
Michael likes coffee. “I've had some questions about the name. When I created the module, I discovered that the name was still available. Since I am a real coffee lover, I named my first contrib module after it ... And like the hot, brown fluid, it makes you more productive.”
Has Drupal 8 changed this module?
“Despite being fans of keyboard shortcuts, we’ve added a ‘Go to’ menu item you can click on to activate Coffee in Drupal 8” :-) “I got an initial version of Coffee working with the helps of other devs all the way back at Drupal DevDays Szeged, in March 2014. It was challenging to learn all the changed concepts in Drupal 8 and work with an undocumented version of the API at the same time, so I waited before I continued development. Starting with Drupal 8 RC1, I took the time to getting it working again and thanks to the hard work and help of Marco, we got a beta version of the module out.”
The Future of Coffee
Gábor Hojtsy is putting some time and effort into getting Coffee into Drupal 8 core. Maybe we’ll be seeing it in Drupal 8.2!
Thanks, Nico!
“My thanks also to Nico Grienauer for designing the Coffee Module logo.”
Tristan and the Drupal coffee ...