Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I suggest having a blank new item line appear in the edit form immediately below the current item when the title field gets focus. This would make it much easier to insert new items in the middle of a long menu.
Comments
Comment #1
donquixote CreditAttribution: donquixote commentedThe consequence would be that a part of the list would jump up or down each time you focus a different line.
Example:
see the lines BBB, CCC, DDD and EEE jump down, as the focus goes from EEE to AAA ?
I would like to avoid this kind of jump.
Maybe you can change my mind if you show me an example where something similar is implemented :)
Comment #2
donquixote CreditAttribution: donquixote commentedTo be fair, we already have a similar kind of jumping with the textarea resize effect, which I consider an acceptable tradeoff.
Comment #3
donquixote CreditAttribution: donquixote commentedAs an alternative, how would you like an "insert item" button? just playing with ideas here..
Comment #4
donquixote CreditAttribution: donquixote commentedWow, I notice there is another usability problem with this, even worse.
If you tab from one row to the next, you will always land on the blank new item before you can reach the next row. Or, if it really only shows up when hovering the title field (and not the path field), the blank line will be unreachable with tabbing. It will feel very inconsistent and awkward.
Comment #5
donquixote CreditAttribution: donquixote commentedThe "insert row" button can happen in 4.x, with the help of multicrud.
Comment #6
DrewMathers CreditAttribution: DrewMathers commenteddonquixote,
Yes, an "insert row" button would be a good way to do this.
Comment #7
donquixote CreditAttribution: donquixote commentedI might do this even without multicrud:
- increase the number of empty rows at the bottom (say, 40 instead of 8), but hide all but one of them with javascript.
- reveal hidden rows when there are no visible empty rows left at the bottom.
- provide buttons to insert one of the hidden rows as a child or sibling of another item.
I'm not sure when I will have the time to work on multicrud. On the other hand, anything I do on multicrud can be reused for a lot of other modules I might create in the future.
How important is this feature request?
Comment #8
DrewMathers CreditAttribution: DrewMathers commenteddonquixote,
The insert button would be a significant usability improvement. You could use Menu Editor to test a technique, then move that code into Multicrud later.
Comment #9
donquixote CreditAttribution: donquixote commentedThe multicrud code has very little to do with the current version of menu_editor, so there is no way to migrate this.
I will have a look at multicrud again, and then decide what to do.
Comment #10
DrewMathers CreditAttribution: DrewMathers commentedThere is a very nice implementation of insert/delete rows in http://drupal.org/project/options_element
Comment #11
donquixote CreditAttribution: donquixote commentedthere is now an experimental/preview release of multicrud 2.x available, namely multicrud-6.x-2.0-unstable1. This release has a replacement for menu_editor included ("menu_multicrud").
It does not have the "insert row" buttons, but it does automatically add rows at the bottom.
We should implement these buttons on multicrud itself, so that every multicrud-powered form can benefit.
Unfortunately, the multicrud javascript is a beast...
Comment #12
apadernoI am closing this feature request, as it's for a not supported project version. If you want to see this feature implemented for a supported project version, please re-open this issue.