The site configuration tab can become very long. Especially on small screens like on notebooks.
Things get worse with my habit to about doubling the height of the fields to make them easier navigable and clickable - I often get lost on the default one.

I'm not completely sure about what should be the logic in the division: maybe "config core" and "config contrib" would make sense.

Comments

sun’s picture

Version: 5.x-1.2 » 5.x-2.x-dev

Good idea. However, not trivial.

With the re-factored code in 5.x-2.x, it might be possible to use the 'package' information of all modules and group them by package (Settings only). I think, that would be the best option. What do you think?

sun’s picture

Assigned: Unassigned » sun
Category: feature » bug
Status: Active » Needs review
StatusFileSize
new3.79 KB

This can certainly considered as a bug and needs to hit 5.x-2.x.

Attached patch implements the proposed solution in #1 -- each contrib module that defines a 'package' in its .info file is moved into a corresponding settings category (package name).

Certain core modules are moved into a new category 'System'.

Modules that do not define a package, are not moved. Thus, this is also great QA tool for module maintainers... ;)

Let me know what you think. I've tested it on a site with 56 enabled modules and the results are quite impressive.

Please bear in mind that this patch is against latest 5.x-2.x.

sun’s picture

Title: Split "site configuration" tab into two dropdowns » Split module settings into sub-menus
sun’s picture

StatusFileSize
new3.8 KB

Any feedback? I like it very much so far. We probably should use the same categorization for the Drupal.org issue queue links.

Re-rolled patch against latest 5.x-2.x.

sun’s picture

StatusFileSize
new3.87 KB

Re-rolled patch against latest 5.x-2.x after code clean-up.

eigentor’s picture

Sorry for not replying until now ;) I did not expect you to act so quickly. Well, just entering the coding business, I don't even know how to apply a patch. I found this tutorial http://drupal.org/patch/apply. Is this the way to do it ?
Sorry for being a noob ;)

OK, I tried. Somehow it refuses to apply the patch, This is what I'm told:
patching file admin_menu.inc
Hunk #1 FAILED at 149.
1 out of 1 hunk FAILED -- saving rejects to file admin_menu.inc.rej

And the file admin_menu.inc.rej is created with your patch in it.

CloudCuckoo’s picture

@eigentor
They're the instructions I followed and it applied for me. Did you apply the patch to 5.x-2.1 or 5.x-2-x-dev (the development snapshot)? The patch is against the dev release.

@sun
Notes I took while taking a tour around a clean install of Drupal 5.5, patched admin_menu and two roles set up:

site administrator: who can access everything.
content manager: with 'administer nodes', 'administer content', 'access administration menu' and the 'administer filters' permissions.

There's some questions in here. I apologise in advance if they're stupid ones.

Logged in as site administrator:

"Yay! Look at how all those menu items that I have so very little cause to use all that often have just been tidied away. That's a +1 right there."

Certain core modules are moved into a new category 'System'.

The expected core settings are moved under system menu item. Paths are correct with both ?q= and 'clean-urls'.

each contrib module that defines a 'package' in its .info file is moved into a corresponding settings category (package name).

Installed and enabled Voting Api and fivestar modules. Both are in the Voting package. As expected Voting api and fivestar settings links are moved under settings category Voting.

Installed and enabled Javascript tools including Tabs, Collapsiblock and Active search modules. Despite all info files defining the package as Javascript tools there is no settings category for Javascript tools and the menu items aren't moved.

Qn: Modules that don't define $items['access'] so use the access rights of the parent menu item aren't moved, is this intentional/desirable?

[EDIT] Qn: Is it safe to assume the path to a modules settings will always be $path = 'admin/settings/'. $module?
(Off-hand I can only think of one module where this isn't the case, that's form inspect).

Logged in as content manager:

The core settings (that I didn't expect to see) are not moved under category System (I expected that).

Qn: Logged in as content manager I expected only 'Content management' with the relevant child menu items and 'Site configuration' with the single child item 'Input format' to be visible. However 'Logs', the icon menu items 'administer' and 'run cron', and ALL the site configuration menu child items are also visible. Are my expectations wrong?

As content manager after assigning voting api permissions to the role:

As expected Voting api link is moved under settings category Voting.

We probably should use the same categorization for the Drupal.org issue queue links.

I'm not sure you should but that's because I look for issue queues by project name. What package it's in is irrelevant to me here.

Which leads to -

Qn: Currently links are being created to issue queues that don't exist. Modules such as Views UI, JS Tools Tabs, all of the CCK project don't have issue queues of their own because they're project components. If I have these modules enabled it results in several redundant links to the 'all issues' page at d.o.

Wouldn't it be better to instead link just to the unique project issue queues rather than duplicate them for each module?
e.g.

- CCK issue queue
- Views issue queue

Instead of

- Content issue queue
- Node reference issue queue
- User reference issue queue
- Views issue queue
- Views UI issue queue

And

Qn: shouldn't these urls be created using $url = 'http://drupal.org/project/issues/'. $info['project'] ?

eigentor’s picture

Finally I took the right version - 5.2.x.-dev and managed to apply the patch successfully. After it refused to work first (maybe an issue with admin_menu_dropdown, which I also use) I finally got to full sight.

Wonderful, Sun! That's it. The "systems" category and "image" category saves one third of the column height alone!

Yeah, and as you said: It's putting the weight on module maintainers to group modules in a sensible way. Down with scattering... Up with building coherent groups. In Detail, one can find a lot of modules that should place their settings elsewhere than they actually do. Shame I did not find any in a quick search ;)

So it is different than the solution I thought of, but better.

sun’s picture

StatusFileSize
new4.48 KB

New patch.

Qn: Modules that don't define $items['access'] so use the access rights of the parent menu item aren't moved, is this intentional/desirable?

No, that's gone now. However, this needs thorough testing.

Is it safe to assume the path to a modules settings will always be $path = 'admin/settings/'. $module?

No, it's not. However, AFAIK there is no way to determine the real paths of module setting pages. So I doubt we can do much here.

Currently links are being created to issue queues that don't exist. Modules such as Views UI, JS Tools Tabs, all of the CCK project don't have issue queues of their own because they're project components. If I have these modules enabled it results in several redundant links to the 'all issues' page at d.o.

That is fixed in this patch, too. Now using 'project' information of module .info files for d.o issue queue links. Downside: 'project' information is added by packaging scripts run on d.o, hence there are no issue queue links for direct CVS checkouts.

sun’s picture

StatusFileSize
new6.29 KB

Not good: The new package grouping menu items are linking to admin/settings and because of that, the menu item id of admin/settings is changed in admin_menu's path index afterwards. This means that a subsequent call to admin_menu_add_item() with the parent menu item id of admin/settings would add an item below the last package grouping menu item instead of "Site configuration".

IMO it would be best, if those grouping menu items wouldn't be a link at all. However, that is not easy to implement, because we need to assign a path for grouping items to move other items below them.

Attached patch works, but I'm not really happy with it.

eigentor’s picture

@sun: Will this patch become part of the regular admin_menu module, once the pitfalls and bugs will be sorted out?

sun’s picture

@eigentor: Yes, definitely. But I still don't have an idea that works out.

encho’s picture

Subscribing

cbloodworth’s picture

When I ran this patch, I received error messages in Terminal, telling me that the patch failed on lines 149, 192, and 212. How do I rectify this?

If it is helpful to know, I also have Admin. Menu Dropdown installed.

eigentor’s picture

Check the module version this patch is for. I'm pretty sure this is the reason for patch failing.

sun’s picture

Version: 5.x-2.x-dev » 6.x-3.x-dev
Status: Needs review » Needs work

I wonder whether

- some hook_menu_alter() magic would allow us to parse out the module package name of all first-level items below admin/settings, and

- move them below new, injected MENU_DYNAMIC_ITEMs for the package name, i.e. admin/settings/[package-name]

sun’s picture

Category: bug » feature

Bug? I clearly must have been blindfolded back then in 2007.

dave reid’s picture

Marked #430294: Cycle through long menu lists as a duplicate of this issue.

hapydoyzer’s picture

subscribing

giorgio79’s picture

I seem to have this issue in Drupal 6 as well

pimok3000’s picture

subscribing

eigentor’s picture

Well As hopefully the entire structuring of the admin Sectio will be reworked in D7, this might make not as much sense as before. Probably not all Modules will be found under settings or system will be split out. The current state of Marks and Leisas Header does this.

pescetti’s picture

subscribing

sun’s picture

Status: Needs work » Closed (duplicate)

Marking as duplicate of #508458: Config and modules page. You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.

However, thanks for taking the time to report this issue.