Quantcast
Viewing all articles
Browse latest Browse all 294099

Use sensible block categories (rather than module-name categories)

Problem/Motivation

The default category of a block is currently the name of the module that provides it. For some blocks, the category name has semantic value. One example is a block provided by the menu module. For a block provided by the system module, the category name 'system' adds little additional information to an end user trying to find a block or seeking to understand what a particular block might do. As the number of modules increases with an installation, so too will the number of categories on the block placement page.

Image may be NSFW.
Clik here to view.
Screenshot of the block placement page. The block category labels (e.g. system, menu, comment, node, search) are highlighted to make them more salient

In order to avoid a fragmentation of block categories and to provide more meaningful semantic grouping of blocks, we should group them in core into more use-based categories. The pattern we set up in core will do much to shape the patterns that evolve in contrib from it.

Proposed resolution

Initial discussion of the proposed categories began in this google doc: https://docs.google.com/a/acquia.com/document/d/1YHbJ_2iGOsUsrC0FPVJLcWk...

That conversation is now moving to this issue. The proposed categories include:

Collapsed

  • Menus
  • Content blocks (Custom)
  • Content lists (views)
  • Forms
  • RSS feeds (hidden, no default blocks)
  • Widgets (hidden, no default blocks)`

Expanded

  • Menus
    • Admin
    • Main Navigation
    • User account
    • Secondary
    • Tools
    • Breadcrumbs
    • Shortcuts
    • Footer
  • Content blocks (Custom)
    • Site logo
    • Site Slogan
    • Main page content
    • Copyright
    • Powered by Drupal
    • System help
    • Syndicate
  • Content lists (views)
    • Recent content
    • Recent comments
    • Who’s new?
    • Who’s online?
  • Forms
    • Search
    • Contact
    • User login
    • Content language
    • Admin language
  • RSS feeds
  • Widgets

Note: The following heuristic was used to determine if the category name has sufficient “link scent” to prevent the user from checking multiple categories.

Heuristic: Fill in the blanks in the following sentence:

“[block name], is a [category] used to display the [verb form of the category + block name] [optional modifier + pronoun] your site”

Examples:
“‘Secondary’ is a Navigation menu used to navigate the Secondary sections of your site”
“‘Copyright’ is a content block used to contain the copyright information in your site”
“‘Recent comments’ is a content list used to list the recent comments in your site”
“‘Content language’ is a language switcher used to switch the content language in your site”
“‘User login’ is an entry form used to enter the user login information on your site”

Remaining tasks

  1. Finalize the list of categories.
  2. Alter the code to associate each block with its category.

User interface changes

Category names will change.

API changes

None.

#2060859: Make Block plugin's "category" a translatable string

Original report by @jessebeach


Viewing all articles
Browse latest Browse all 294099

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>