Problem
Menus allow for multiline input as the menu description. However the text is only ever displayed in the admin overview table for menus, which would especially look odd with multiline text. There is no other (core) use for this text.
Proposal
Make the description a regular one-line textfield and explain it is used as an admin description. Such as Views does, labeling as "View description" and explaining as "This description will appear on the Views administrative UI to tell you what the view is about.".
This issue came up in #663946: Merge "List links" page into "Edit menu" page.
Comment | File | Size | Author |
---|---|---|---|
#15 | menu-description-ux-15.patch | 731 bytes | Gábor Hojtsy |
#4 | menu-description-ux-4.patch | 704 bytes | Gábor Hojtsy |
#1 | menu-description-ux.patch | 794 bytes | Gábor Hojtsy |
Screenshot_2_25_13_12_07_PM.png | 37.14 KB | Gábor Hojtsy | |
Screenshot_2_25_13_12_07_PM 2.png | 54.44 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyInitial patch. Needs upgrade path for truncating existing descriptions, which is why it was not solved in #663946: Merge "List links" page into "Edit menu" page right away. Marking needs review for bot.
Comment #2
sunHow about changing the label to "Administrative summary" and omitting the description?
Comment #3
Gábor HojtsyThat works for me as well. I just got inspiration from Views :)
Comment #4
Gábor HojtsyWith the suggested change. Still needs upgrade path. Anybody wanna take a crack at that? :)
Comment #5
sunI don't really see what kind of upgrade path would be required (or even possible) here. Any newlines will simply vanish, but the former value is still fully contained in the textfield.
Comment #6
chx CreditAttribution: chx commentedWell theoretically you could run an UPDATE description=REPLACE(description, "\n", ' ') for an update path but let's NOT do that. It's pointless and problematic.
Comment #7
David_Rothstein CreditAttribution: David_Rothstein commentedSee #663946-73: Merge "List links" page into "Edit menu" page for the upgrade issues. It doesn't quite destroy data or anything, but leaves it kind of broken nonetheless.
Comment #8
Gábor HojtsyCopying here for posterity, quoting David:
Comment #9
sunLet's not over-engineer this. I've yet to see any kind of "advanced" usage of menu descriptions.
In fact, almost all sites I've ever seen completely ignored the menu descriptions, because the only place they're output is on the administrative listing of menus, which almost no one ever sees. The usefulness of these descriptions is close to zero, and the values actually rather map to "technical site builder notes" that are logged for posterity, so as to answer the question of: "Why did I create this menu again...? - Ah, I see. - That no longer exists though, looks like we can delete this menu?"
Thus, on #8:
1) Let's simply ignore that. People can manually update their administrative summaries. That's not the end of the world.
2) The descriptions are stored in config now. We can apply a #maxlength of 255, or even 1000, or even 10,000, if we wanted to. YAML does not care. I'd recommend to go with something sensible though; e.g., <=512.
Also note that #maxlength is ultimate/final. Browsers cut off an existing default value that exceeds the maximum length.
Comment #10
Gábor HojtsyAny other opinions?
Comment #11
Wim Leers+1 for #9, "lets' not over-engineer this". I also have never seen any kind of "advanced" usage of menu descriptions. In fact, most sites I've seen have *empty* menu descriptions.
Comment #12
sunI actually would have proposed to remove the descriptions entirely, if there wasn't a single use-case for which they are actually helpful — which is the first-time Drupal evaluation experience: For people who are looking at Drupal for the first time, these administrative descriptions help to understand what those menus are supposed to contain.
That said, with the new Tour module in core, one could reasonably argue that these could as well be tips...
Comment #13
Gábor HojtsyI think single line descriptions are useful when creating menus on the site, leaving notes for other site builders. Multilingual sites, eg. sometimes need different menus for languages if they want different structures. So creating numerous custom menus is a reasonable thing to expect. I don't think a multiline description has a use case or that people used this in practice. Theoretically they maybe did dealing with it being our question :)
Comment #14
sunOK, how about quickly adding a #maxlength of 512 and call this done?
Comment #15
Gábor HojtsyHere it is.
Comment #16
sunThanks!
Comment #17
Wim LeersNice & simple :)
Comment #18
webchickNice and simple clean-up. The upgrade path is a bit of a bummer, but it seems a fairly good case has been established for why we might not need to worry about that in this case. I too have never seen this expanded out beyond a few words.
Committed and pushed to 8.x. Thanks!
Comment #19
David_Rothstein CreditAttribution: David_Rothstein commentedA default installation of Drupal 6 actually gives you some very long ones out of the box (e.g., for the Navigation menu) but the longest looks to be 225 characters. I guess that means 512 is likely to cover most real life cases.
I'm not convinced people won't run into problems with this though. It is hard to imagine no one has ever deliberately started a new paragraph in this field in the history of Drupal? :) And there are a number of forum posts and code snippets about "how can I display my menu descriptions underneath the menu title on the front end of my site" so I don't think this is being used for administrative descriptions only (even though that's clearly the majority case).
Comment #20
Winn CreditAttribution: Winn commentedI don't really see what problem or usability issue this is solving. The menu edit form is very short and will not benefit significantly from the added space savings. I agree that more accurate labeling in a good thing, but what's the harm in a multi-line text box?
Comment #21
Gábor HojtsyWinn: its shortness depends on the number of menu items you have in the menu which are all displayed below the main menu properties.
Comment #23
Gábor HojtsyLanded, remove sprint tracking.