@anonymous-piwik-user opened this Issue on December 14th 2010

The confirmation dialog [yes/no] when deleting a widget is shown at the top of the page. This is not necessarily obvious/easy to see. It should be shown on top of the widget you're trying to delete, instead.

Alternatively/ideally, it should not even be required; it should be an "undo" dialog: http://www.alistapart.com/articles/neveruseawarning

@robocoder commented on December 15th 2010 Contributor

re: position

jquery-ui doesn't have a setting to position it relative to a widget/element.

The confirmation should be centered in the middle of the viewport. (That's the default jquery-ui behaviour.) Not sure why it has shifted so much (even on trunk).

re: undo

Maintaining an undo stack (i.e., previous state information) is non-trivial. PHP is basically stateless (it frees/releases resources at the end of a request); similarly, when the browser loads a new page.

It's more complicated than it might appear at first glance. You also have to factor in that users oftentimes open multiple tabs to their Piwik dashboard. "Undo" would have to be maintained per browser tab or window.

@julienmoumne commented on December 15th 2010 Member

Maybe it doesn't have to be a history undo but a simple one-action undo.

Use case :

1) The user mistakenly removes a widget and notices it immediately

2) The user clicks "undo", the widget is restored

Between 1) and 2), if the user leaves the page or do another action then the undo is lost. No big deal, it's only a widget.

This mechanism would be implemented in JavaScript solely.

@mattab commented on January 17th 2011 Member

I think the widget modal is easy to spot as it displays in the top middle of the screen on top of a grey background.

This Issue was closed on January 17th 2011
Powered by GitHub Issue Mirror