"Coffee" is a module that helps administrators navigate through the Drupal admin pages. Inspired by Alfred/Spotlight on OS X, now you can have that awesome searchbox right in your Drupal. Just hit alt + d to fire up Coffee, start typing the title or the path you want to visit and make your choice. See attached screenshot to give you an idea.

It is not a Alfred plugin, but it gives the concept of Alfred to Drupal (a searchbox to find quickly a page)

- Shortcut = alt+d
- type directly the path or title of a page you want to visit
- use arrow up / arrow down to navigate in the results list

There is a separate permission to use Coffee and there is also a hook, hook_coffee_command(), where developers can define there own command and results for Coffee, see coffee.api.php for more information.

Project page: http://drupal.org/sandbox/michaelmol/1356930
Git clone: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/michaelmol/1356930.git coffee
Drupal version: 7, not further dependancies

Reviews of other projects:

CommentFileSizeAuthor
#16 drupalcs-result.txt10.89 KBklausi
Screenshot Coffee.png112.33 KBmichaelmol

Comments

BarisW’s picture

Very, very nice. Looks great!

wulff’s picture

Just out of curiosity: How does this module differ from the Cobalt module?

michaelmol’s picture

The main difference between Cobalt and Coffee in my opinion is that the focus of Coffee is to provide a clean interface for navigating between the different admin pages. Cobalt is more developer focused, with actions that can be executed from the window. Besides that Coffee uses the functionality of Drupal core menu to look up results, instead of using a own table for lookup purposes and it don't depends on third party javascript libraries.

wadmiraal’s picture

+1 for this module.

Cobalt is way heavier than this module, with a lot more features. Plus, it relies on Google Gears for certain, non-compatible browsers (which includes FF). Another "problem" (or so it seems) with cobalt is updating your local urls (deleted nodes/users still show up: #448278: Deleted user still available in Cobalt).

Coffee provides just a nifty shortcut system. It can really be useful.

However, I would add an access-check for your suggestions. At this time, your module returns ALL results. But some users will not have access to all admin pages. It's not a security risk, but still... UX is important and it should be intuitive.

I don't know if my remark deserves a "needs work" status...The webmaster must decide :-).

Besides that, I'd say R&TBC.

wulff’s picture

@michaelmol: thanks for clearing that up.

The code looks good and from playing around with it, this seems like a pretty cool module. A definite +1 from me as well!

michaelmol’s picture

An access check is definitely on my wish-list for Coffee, thanks for your reply

aschiwi’s picture

+1 for this module. I found it today and I will most likely add it to every Drupal 7 project in the future because I've been having a real hard time finding config pages in Drupal 7 and this module just works.

I'm no PHP developer so I can't do a code review, but the code looks pretty clean. The .module file is missing the single newline at the end of the file. Small code style issues are looked at in detail before you get project access, so you might wanna go through your module again to see if anything can be improved (Drupal Coding Standards)


All text files should end in a single newline (\n). This avoids the verbose "\ No newline at end of file" patch warning and makes patches easier to read since it's clearer what is being changed when lines are added to the end of a file.

Thanks for your contribution and good luck with your application!

michaelmol’s picture

@aschiwi thanks for your comment.
will fix the code formatting, thanks.

fubhy’s picture

@michaelmol this looks REALLY cool. I am going to help you with the coding standards and reformatting of the code if you don't mind. I already started it because I didn't see your latest comment here.

wadmiraal’s picture

Status: Needs review » Needs work

A small "bug" (UX):
Even if there's only one suggestion, you still have to use the "down" arrow to "select" it (even though, visually, it is selected). Just hitting enter will only reload the current page. This is a bit strange and not very intuitive. Either the default selected element is active, and hitting enter take's you there OR there's no item selected by default and you must always use the "down" arrow to select one.

Otherwise, Coder is all green and happy, and the module works.

michaelmol’s picture

I will create an issue, so that maartenverbaarschot can look at this, thanks for reporting.

michaelmol’s picture

Status: Needs work » Needs review

maartenverbaarschot just fixed this issue

wadmiraal’s picture

Status: Needs review » Reviewed & tested by the community

@michaelmol, #11

Oh yeah, I forgot that after the Git migration, sandbox projects also have issue trackers :-). You guys are fast !

Perfect, it works.

michaelmol’s picture

@wadmiraal i just commited a fix for access issue see
#1400048: Add access check for links

klausi’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new10.89 KB

There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.

wadmiraal’s picture

@michaelmol
Sorry, I guess I was to quick

@klausi
Sorry, should have been a bit more thorough. Still have a lot to learn :-). Great tool BTW (PAReview).

michaelmol’s picture

Status: Needs work » Needs review

I have cleaned out the master branch and formatted the code and documentation according the coding standards.
The online PAReview gives out a clean result: http://ventral.org/pareview/httpgitdrupalorgsandboxmichaelmol1356930git-...

Looking forward to your review results.

michaelmol’s picture

Issue tags: +PAreview: review bonus

Added tag: PAReviews: review bonus as outlined on http://drupal.org/node/1410826

bertboerland’s picture

+1. please let it be a project

BarisW’s picture

Status: Needs review » Reviewed & tested by the community

Good clean code, a clear README, Coder returns 0 errors, PARreview looks good. All fine!
Not sure if I'm allowed to do so, but IMHO I say RTBC.

dqd’s picture

I say RTBC and give a million +'s to michaelmol :-) for that nifty tool.

Awesome contribution:
simple, fast, clean, lightwight... sexy ...

How it should be for that purpose!
+1 for a full project from me!

klausi’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus
  • coffee_result_handler(): you should use drupal_json_output() here.
  • coffee_result_handler(): why do you use check_plain() here? You should only sanitize user provided data if it is printed to the user, not before.
  • coffee_init(): why do you always include coffe.hooks.inc on every page load? You should only include it if your are actually going to execute a command.
  • coffee_redirect(): same thing with check_plain() here: do not filter on input, filter on output only. See also https://drupal.org/node/28984
  • You clould implement hook_hook_info(), so other modules could provide their coffee integration in a dedicated .coffee.inc file.

Otherwise this looks nearly ready. Removing review bonus tag, you can add it again if you did some more reviews of other projects.

michaelmol’s picture

Status: Needs work » Needs review

Thanks klausi for your feedback, I have just commited your suggestions.

The include has moved from the hook_init() to coffee_handler() function.
As there isn't directly printing from the user input, I removed the several check_plain() implementations.
Added the hook_info_info implementation.

Looking forward to your review.

michaelmol’s picture

Issue summary: View changes

Added Reviews of other projects section

dqd’s picture

The main difference between Cobalt and Coffee in my opinion is that the focus of Coffee is to provide a clean interface for navigating between the different admin pages. Cobalt is more developer focused, with actions that can be executed from the window. Besides that Coffee uses the functionality of Drupal core menu to look up results, instead of using a own table for lookup purposes and it don't depends on third party javascript libraries.

michaelmol: Since it is recommended to announce comparable modules on project pages I would like to suggest to put that info on your frontpage. Additionally maybe a short write-up about teleport, but I am not sure if it supports D7. Somebody on IRC mentioned that a similar functionality is planned for admin_menu, but I honestly would rather like to see your sexy small module make it to the spotlight, to have a better choice between different administration tools.

Coffee is awesome. I already use it frequently and love it :-)
Hope it helps.
Good luck

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Looks RTBC to me.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

This looks like a great module! I'm excited to use it more.

Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

dddbbb’s picture

This looks great. As a big Alfred user I could see myself using this alot in Drupal development. Anything to speed up and simplify admin navigation is a good thing IMHO. Project please!

michaelmol’s picture

Thanks for the review(s).

Coffee has now an official 7.x-1.0 release!
For futher information see the project page at http://drupal.org/project/coffee

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated documentation