UMN Usability: Preview feature for blocks
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | usability |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Especially for custom blocks, but even for programmatic, module-derived blocks, it'd be really neat to be able to hit a "preview" button and know instantaneously what the block's content going to look like before it's live on the site.
Currently, the process for adding a custom block to the site goes like:
- Go to admin/build/block/add.
- Enter the block body. Also enter in some wacky visibility stuff so your inevitable mistakes aren't visible to your larger website audience.
- Save the block page.
- Move the block to one of your regions so it's visible.
- Gasp in horror at your awful missing </ul> or whatever horrible thing you messed up that completely breaks your site's layout.
- click "configure" on the block.
- Edit the body, trying to get it right this time.
- Save the block page again.
- Repeat steps 5-8 until horror gasping subsides.
- click "configure" on the block one last time.
- Set the visibility on the block how you actually want it.
- Save the block page one last time.
That's an awful lot of steps.
How about this?
- Go to admin/build/block/add.
- Enter some body text. Be bold. Leave off as many tags as you want.
- Click "Preview"
- Fix as necessary.
- Set the visibility how you want it.
- Save the form.
- Move the block to proper the region.
- Go treat yourself to a nice tea, since you just got 5-10 minutes of your life back.
This would work basically like node previews, where on the customize form there's a preview button that, when clicked, would display the block content in the content area, so that you could see what it looked like iteratively before actually saving it to the database.
Maybe it also makes sense to have a preview icon on the main admin/build/block page to save you a click if you want to know what the "OG Details" block will do when enabled. Not sure.

#1
Awesome idea. I usually go make a story node to test out blocks. This is much better.
Michelle
#2
+1 This would be a terrific enhancement.
#3
Great idea. Like Michelle, I made a node with a path called block_test once just for setting visibility to, then promptly forgot about it until six months later. It's no fun.
Preview icon on admin/build/block - this'd make lots and lots of sense with drag and drop. I imagine it'd not be a trivial thing to do though. There's also the chance you enable a nasty broken php input format block and WSOD yourself (until refresh I guess, but still).
#4
This is definitely a much needed feature. The blocks feature in drupal is excellent but creating and editing multiple blocks consumes more time than necessary because I need to save, activate the block, check the block (usually in another browser tab), then repeat if changes are necessary.
#5
Since this came up in testing I'm retitling this.
#6
Another improvement that I would add to this is the ability to assign a new block to a region directly on admin/build/block/add (similarly to how one can assign a new CCK field to a fieldgroup on the field creation page).
The current workflow is:
Suggested:
This really only makes sense in combination with the suggested preview functionality.
#7
Moving all usability issues to Drupal - component usability.