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.
There's no need to move the top item to the top or the bottom item to the bottom. Still, if the corresponding buttons are clicked, the item is being marked as touched. This doesn't happen with "move up" and "move down".
I'm very proud to post my first js patch. It's not more than adding an if-check, but I'm (unfortunately) absolutely no JS pro, so if this can be easier accomplished, go forward. But - at least - it works!
Comment | File | Size | Author |
---|---|---|---|
#16 | remove_top_bottom_buttons_16.patch | 6.37 KB | Pancho |
#16 | remove_top_bottom_buttons.jpg | 68.52 KB | Pancho |
#8 | remove_top_bottom_buttons.patch | 5.5 KB | Pancho |
list.js_dont_touch.patch | 1.98 KB | Pancho | |
Comments
Comment #1
PanchoThree more suggestions:
- Instead of this we could show the buttons only if its action makes sense to the corresponding item. So for the first item we only show "down" and "bottom", for the last item only "up" and "top".
- Given that most configurations don't have more than two arguments, I'm not really sure we need "top" and "bottom" at all. This would mean: less cruft and less code.
- If we don't leave 'top' and 'bottom' out, we should at least rearrange the icons to be in the order: top - up - down - bottom. That makes logically more sense.
Comment #2
PanchoComment #3
merlinofchaos CreditAttribution: merlinofchaos commentedI'm ok with leaving top/bottom off, honestly. Even with 5 arguments it's not a big problem to move stuff around.
Comment #4
PanchoDoes this mean that I can also remove all JS code the top/bottom button functionality uses? That wouldn't be bad for performance...
Comment #5
sun+1 for removing top/bottom along with the JS code
Comment #6
PanchoThis patch should do it. Has undergone some testing, might need some more, though.
Top and bottom buttons are removed along with their JS code.
Also I'm completely removing the shuffle functionality. Don't believe we will ever need "shuffle" in Panels... :)
Comment #7
PanchoAgain, project.module won't let me upload my patch...
Comment #8
PanchoAh, here we go.
Comment #9
PanchoComment #10
merlinofchaos CreditAttribution: merlinofchaos commentedLooks ok on a visual review. I'll see if I can get to this today.
Comment #11
sdboyer CreditAttribution: sdboyer commentedTested, thumbs-up. I'd commit it, but it seems to me this could/should be expanded to remove up arrows from items at the top of one of these lists, down arrows from items at the bottom, and both arrows from items that are alone?
That may be a bit more complicated, since it means calculating the contents of the whole list and adding/removing items as needed. I'm not particularly attached to the idea, it just seems like a wise decision in terms of good UI.
Comment #12
PanchoYeah, that'd be the optimum from the UI point of view and we should definitely target this for RC.
On my sandbox, I have also some more UI improvements for the context page, that I will roll into a patch, as soon as time permits.
Changing status to RTBC, as patch has not yet been committed.
Comment #13
PanchoComment #14
sdboyer CreditAttribution: sdboyer commentedWhoops, thanks, accidentally had marked it fixed, because I was initially gonna commit it, until I thought of the extra piece about removing the up/down buttons.
Comment #15
merlinofchaos CreditAttribution: merlinofchaos commentedRemoving the extra buttons turns out to be quite a bit of work because you have to add placeholders to prevent the buttons from moving around. (It's very jarring if the buttons move).
Comment #16
PanchoSo I'd say, we should leave the inactive buttons in for now. There's so much to do and we need to move forward with this.
Enclosed patch also replaces the 'configure' and 'delete' buttons by the nicer ones used in the content screen. From my POV it looks a lot better, even though the arrows are not 100% the same style. Please check and RTBC if you like it as well.
Note: Whoever commits this, needs to remove 'add.gif', 'close.gif', 'configure.gif', 'delete.gif', 'go-bottom.png' and 'go-top.png'.
Comment #17
merlinofchaos CreditAttribution: merlinofchaos commentedApplied. NOte that close.gif appears to still be in use.
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.