#25952 closed enhancement (fixed)
Allow widgets to be dropped onto closed sidebars
Reported by: | shaunandrews | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
It should be possible to drag-and-drop a widget onto a closed sidebar. @azaozz has an initial patch, but this needs more consideration.
Attachments (8)
Change History (23)
#1
@
11 years ago
A quick video of the 25952.2.diff in action: https://cloudup.com/cNpXPAOBe3w
#2
@
11 years ago
In 25952.3.diff:
- Clean up the JS a bit.
- Reuse addWidget() to process the widget after dropping.
- Fix a problem with disappearing reference element when dragging the widget over an open sidebar and then dropping it on a closed sidebar.
The css will need some refresh/tweaks.
#3
@
11 years ago
Dragging a widget from a sidebar over to a closed sidebar doesn't work. The closed sidebar highlights on hover as expected, and once you drop the widget, the closed sidebar opens, but the widget isn't moved.
#4
@
11 years ago
In 25952.5.patch:
- Include the sidebar title in the sortable making it possible to drop widgets on the title. That increases the drop area and lets the user drop on a closed sidebar.
- Fix expanding widgets.
- Some css and js cleanup.
This works well but requires that we change the html outputted from wp_list_widget_controls() a bit. That may break couple of plugins. It is possible to add another agr to output the "new" html.
However I'm still not fully convinced this makes it more useful. As the new widgets screen layout emphasizes the sidebars, perhaps better would be to have them all open on page load. Also, maybe the left and right areas can scroll independent from each other making it possible for the user to see the desired widget and the desired sidebar side by side.
#7
@
11 years ago
I think 25952.5.patch makes things worse. 25952.4.diff seemed like a simpler interaction, and solved the root problem.
#10
@
11 years ago
In 25952.6.patch:
- Fix possible regression in wp_list_widget_controls(), add an optional argument to output the sidebar name inside the sortable container.
- Lock the sortable containers min-height while dragging to prevent them from jumping when moving a widget to a closed sidebar.
- Move widgets dropped on closed sidebars to the top. UI Sortable places them randomly near the bottom.
Also tried to implement "jump-open" when holding a widget over a closed sidebar, however UI Sortable randomly fails to activate after the timeout and the dragged widget cannot be placed properly.
#11
@
11 years ago
In 25952.7patch:
- Tweaks the styles for the sidebar description, removing the border-top and adding padding to align it with the rest of the text in the sidebar. Added a margin-top: -5px; to bring the description slightly closer to the sidebar name, making the context more obvious.
- Removing the gauche blue glow on closed sidebars when a widget is dragged overtop. Replaced it with a more subtle border color change, slight box-shadow, and subtle opacity.
#12
@
11 years ago
In 25952.8.patch:
- Merge the styling changes from 25952.7.patch.
- Kill some more !important and fix the draggable helper's size.
- Refresh after [26366].
Dragging a widget over a sidebar will highlight. Dropping it will clone it and save the sidebar.