When first using the election module, there's not an intuitive way to figure out how to create new elections and posts due to a lack of menu items or documentation on how to get started.

Create some menu items in the devel menu for:

* Adding elections
* Viewing added elections
* Adding posts to those elections

Comments

ricky.middaugh’s picture

Status: Active » Needs review
StatusFileSize
new6.12 KB

Adding a patch for review. This add menu items that are simple redirects to other actions in the module. Because we're displaying the names of added elections in the menu, this means we need to clear the Drupal cache whenever an election is added, deleted, or modified.

ricky.middaugh’s picture

Assigned: ricky.middaugh » Unassigned
pjcdawkins’s picture

Status: Needs review » Postponed (maintainer needs more info)
StatusFileSize
new4.96 KB

I don't really understand what this patch solves.

When first using the election module, there's not an intuitive way to figure out how to create new elections and posts due to a lack of menu items or documentation on how to get started.

Better documentation is certainly needed.

But the "lack of menu items" may have been fixed by various commits in the past 2 weeks: it used to be that an extra cache clear was needed before "Add new ..." would show up on /elections.

The structure in the Navigation menu (Elections -> Add new ...) seems to be clear to me. There might be a question as to whether the Navigation menu is the best place. But that's where the core Drupal "Add content" link sits:

Screenshot of Navigation menu after Election is installed

A few comments on the patch itself:

  • The patch at the moment doesn't appear to have any visual effect for me. There's no 'type' set on your "admin/content/elections" menu item, which might explain that.
  • Devel is a contrib module, so 'devel menu' probably doesn't describe what you mean.
  • drupal_goto() as a menu callback is an interesting but I think too hackish way to add menu items.
  • Clearing caches can be a massive performance hit for sites, so a situation where the cache is cleared whenever elections are created, deleted, or edited is not good. hook_menu_alter() would help here (instead of hook_menu()).
  • Loading all available elections just to build the menu isn't scalable, in theory, even though most sites may not have very many elections.
  • Elections aren't "content" in my mind, which is why they're not node types in the first place. But if you think the UI is confusing that they're not under admin/content, perhaps it's worth testing this more thoroughly. Really if we want stuff to be under admin/content we should make elections into nodes.
pjcdawkins’s picture

Assigned: Unassigned » pjcdawkins
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new23.35 KB

Status: Needs review » Needs work

The last submitted patch, 4: election-1994916-4.patch, failed testing.

The last submitted patch, 4: election-1994916-4.patch, failed testing.

pjcdawkins’s picture

Status: Needs work » Needs review
StatusFileSize
new24.46 KB
pjcdawkins’s picture

Status: Needs review » Needs work

This needs a manual re-roll.

liam morland’s picture

Status: Needs work » Needs review
StatusFileSize
new24.32 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, 9: election-devel_menu-1994916-9-D7.patch, failed testing.

liam morland’s picture

Status: Needs work » Needs review
StatusFileSize
new24.32 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, 11: election-devel_menu-1994916-11-D7.patch, failed testing.

liam morland’s picture

Working on a new patch.

liam morland’s picture

Status: Needs work » Needs review
StatusFileSize
new26.17 KB
liam morland’s picture

Status: Needs review » Needs work

If you would like this included in 7.x-1.0, please provide an updated patch in the next week or so.