sailfishos / sailfish-office

Sailfish Office
GNU General Public License v2.0
73 stars 26 forks source link

[documents] Adapt remorse usage to the new design. Contributes to JB#46248 #132

Closed jpetrell closed 5 years ago

pvuorela commented 5 years ago

Remorse from document pages didn't seem to work: file:///usr/lib/qt5/qml/Sailfish/Silica/Remorse.qml:47: TypeError: Cannot read property 'item' of undefined

As UI not entirely sure with delete being so prominently on the toolbar. Can be relatively easily clicked by accident and then might be good if the page isn't yet popped.

jpetrell commented 5 years ago

We should optimize for the common case, which is that you tapped delete because you wanted to delete the item and no longer want to see the document lingering on the screen. For the accidents we provide an easy way to undo the action.

jpetrell commented 5 years ago

The API was used the old way, now fixed.

pvuorela commented 5 years ago

We should optimize for the common case, which is that you tapped delete because you wanted to delete the item and no longer want to see the document lingering on the screen. For the accidents we provide an easy way to undo the action.

I guess my concern is delete, not being a common case to begin with, is being offered so easily available.

But small detail and this works now better, with less code even, so LGTM.

Though one more thing I noticed: open last document in the list, trigger delete inside there and then cancel on the main page -> something flashes at the bottom, but the item gets back visible outside the screen. Ideally could perhaps expect the view to scroll a bit.

And even if the item is restored in the middle of the page, it might be nice if it did some quick blink.