Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#9511 closed enhancement (fixed)

Redesign widgets admin page

Reported by: azaozz Owned by:
Priority: normal Milestone: 2.8
Component: Widgets Version:
Severity: normal Keywords:
Cc:

Description

Last page that uses (the old) Interface.js. The new design uses mostly drag and drop and solves many usability complains.

Attachments (1)

9511.1.diff (635 bytes) - added by sivel 4 years ago.
Notice fix for new widgets page

Download all attachments as: .zip

Change History (49)

[10912] still needs work and lots of testing. It has to look nicer and saving without js doesn't work yet.

sivel4 years ago

Notice fix for new widgets page

(In [10913]) Notice fix for widgets.php, props sivel, see #9511

(In [10916]) Resizing and animation for widgets, see #9511

This is a scary changeset. I really hope WP 2.8 isn't around the corner, because it's going to need some very serious testing.

I'm getting quite a few bugs using a theme with multiple widgets and semi-real sql data. Among the things to check out, I think:

  • multi-sidebar support
  • old-style multi-widget support (widgets getting dumped out of their sidebar)
  • odd script hanging (e.g. text widget that doesn't resize back when saved)
  • rogue widgets (widgets that are stored but not in a sidebar due to a change of themes or layout)

Would you rather I open separate bugs, or should I report them in here as I nail down how to reproduce them?

Also, I take it that the absence of a save button is normal? If so, great, but it may not necessarily be very natural or obvious to users, because that is inconsistent with the rest of WP UI... :-)

a theme with multiple sidebars, that was.

(In [10922]) Widgets: open when adding, clean-up AJAX calls, slower animation/less jumping in IE, see #9511

(In [10926]) Fold widget after saving, see #9511

comment:8 in reply to: ↑ 4   azaozz4 years ago

Replying to Denis-de-Bernardy:

  • multi-sidebar support

All sidebars are displayed on the page, first is open, the rest are folded (click on the name to open). This will need improving to better indicate the closed sidebars.

  • old-style multi-widget support (widgets getting dumped out of their sidebar)

Haven't seen that happening. There's some code to check for old configured widgets and put them in the "Inactive widgets" area. Before they weren't visible at all (but were in the db). Perhaps that's what you're seeing.

  • odd script hanging (e.g. text widget that doesn't resize back when saved)

Fixed.

  • rogue widgets (widgets that are stored but not in a sidebar due to a change of themes or layout)

This is actually one of the most requested features: to be able to keep configured widgets that are inactive (not in any sidebar) and to store the widgets when switching themes and the new theme has less sidebars.

Would you rather I open separate bugs, or should I report them in here as I nail down how to reproduce them?

Perhaps it's better to keep them all here for easier reference.

Also, I take it that the absence of a save button is normal? If so, great, but it may not necessarily be very natural or obvious to users, because that is inconsistent with the rest of WP UI... :-)

There's a Save button on each widget, don't think we need more. Before we had to put up a warning so users don't forget to save, that's not needed now.

Looking great so far. When unfolding a widget in Available Widgets/Inactive Widgets, other widgets after it gets shifted around. The list should be a single column or add a "clear: left" to all the items in the left "column" to fix it.

(In [10927]) Match old/new sidebars by index when switching themes, see #9511

At revision 10934, with 3 sidebars, I can't seem to get WordPress to save when I add a widget to a sidebar...

+1 to that, with 10 sidebars/panels.

More specifically, I can't get it to save a widget created with what should be the new 2.8 Widget API :)

Can you add

var_dump($_POST);exit;

to http://core.trac.wordpress.org/browser/trunk/wp-admin/admin-ajax.php#L1280 and http://core.trac.wordpress.org/browser/trunk/wp-admin/admin-ajax.php#L1310 to see what is submitted (it will be in the return of the AJAX call, can be seen in Firebug, etc.)?

If you press enter in a Title input, the page reloads and nothing saves. Pressing Save send and ajax request and actually saves. Try it with the Meta widget.

(In [10941]) Save widget when pressing Enter, see #9511

this one can probably be closed: #8756

other one related to widget scripts: #6470

more widgets: #8979

yet another: #5859

#5759 while we're at it

#5747 is a nasty js-related one

other potential script bug: #5189

related to widgets api but not with the interface: #4594

(In [11009]) Add and edit widget when js is disabled, see #9511

when you leave the widgets page, it would be sweet if it remembered the last used state, a bit like the admin menu. it's no big deal when you've a single sidebar, but when you've 10 of them, it's... you know. ;-)

That's an idea for all of the manage pages. Hmmm.

(In [11041]) Remove remnants from widgets search, see #9511

(In [11045]) Optionally use the class name as id_base, see #9511

I'm still investigating this, and I may possibly be wrong, but I believe there are bugs when you use old-style multi-widgets, that use the legacy procedure to update (in what would now be the form() method:

http://core.trac.wordpress.org/browser/tags/2.7.1/wp-includes/widgets.php#L1997

Js errors that I bumped into set aside (mine, outlined in a separate ticket, and fixed since courtesy of Andrew), old-style multi-widgets get "added" but fail to stick into the sidebar (sidebar fails, but the widget is apparently deleted, probably due to the old save procedure).

It occurs somewhat randomly, too. I haven't tested on kubrick, which has a single sidebar. But it definitely does happen with my theme (12 sidebars), in spite of the fact that it adds no scripts to widgets.php beyond the one that got fixed since. I'll try this:

http://core.trac.wordpress.org/ticket/9511#comment:14

... and report back if it highlights any pointer to why it's happening.

On a separate note, the widgets apparently no longer display their title. Is this intentional?

Also, UI wise, multi-widgets seem to appear both in the available widgets and the unused widgets. Would it not make more sense to stick to adding configured multi-widgets into the unused widgets?

was meant: (sidebar saves, but the widget is apparently deleted, probably due to the old save procedure).

(In [11160]) Widgets UI styling, see #9511

Right now it's possible to add Widgets with dragging. It would be nice if the same logic would work to remove Widgets - dragging them to the Available Widgets panel.

(In [11246]) Append the widget's title to the header, adjust sidebar height after changing widgets, see #9511

(In [11256]) Put back disabling of sortables for folded sidebars, see #9511

should we close this one and open new tickets for other issues we encounter?

  • Resolution set to fixed
  • Status changed from new to closed

(In [11427]) Fix saving and deleting of widgets settings for no-js and for some non-standard widgets, run the actions from the widgets screen when saving with ajax, see #9511

(In [11445]) Delete widgets when dragged back to Available Widgets, add ui.droppable.js and ui.selectable.js, see #9511

Note: See TracTickets for help on using tickets.