Allow to undo the clear actions on the playlist
Closed, ResolvedPublic

Description

When a clear action is performed on the playlist, the user might lose valuable work. Add the possibility to undo this operation via passive notification. Keep it simple by allowing only one undo and no redo.

mgallien created this task.Feb 17 2017, 7:27 AM
mgallien renamed this task from Allow to undo the clear operation on the playlist to Allow to undo the clear actions on the playlist.Mar 10 2017, 7:51 AM
mgallien updated the task description. (Show Details)
mgallien moved this task from Backlog to In Progress on the Elisa board.Jun 15 2017, 9:42 PM
mgallien moved this task from In Progress to Backlog on the Elisa board.Jun 22 2017, 8:32 PM

Hi !

I am new here and I am very motivated to invest !

I am quite a beginner on this technology, but this task looks good to discover the code ?

Thank you

Hi !

Hello

I am new here and I am very motivated to invest !

Welcome to the Elisa project !

I am quite a beginner on this technology, but this task looks good to discover the code ?

Yes, feel free to ask if you have questions.

Thank you

Best regards

jguidon claimed this task.Feb 20 2019, 9:20 PM

Hi !

Thank you, I have indeed a few questions after a first look at the code :

  • to open a qml file with qt creator (if you use this editor), the qml module for elisa is not found : "import org.kde.elisa 1.0" . Do you know how to configure this module in qt creator ?
  • In the description, what does "passive notification" means ? Does it mean the system notification with a question and a choice ? In this case do you have an example of implementation in another project ?
  • I did a first try where I could restore the playlist and the song in the player. Do I need to restore the position of the player as well ?

All the best

Hi,

Finally, I could use KNotification to generate on the clear action a system notification with an undo choice (the file elisa.notifyrc may be particular for the packaging, KNotificationGlobalConfigFile).

I pushed my changes on my forked repo, branch T5376 : jeje42_T5376 .

I tried to be as generic as possible on the function MediaPlayList::undoClearPlayList .

Best,
Jerome

jguidon moved this task from Backlog to In Progress on the Elisa board.Feb 27 2019, 3:39 PM

Hello,

Sorry, I had missed your questions,

Hi !

Thank you, I have indeed a few questions after a first look at the code :

  • to open a qml file with qt creator (if you use this editor), the qml module for elisa is not found : "import org.kde.elisa 1.0" . Do you know how to configure this module in qt creator ?

Yes, the problem comes from the fact that this qml module is done in c++. This page has information about:
https://doc.qt.io/qt-5/qtqml-modules-qmldir.html#writing-a-qmltypes-file

I do not remember if it would be possible to have it generated by cmake always.

  • In the description, what does "passive notification" means ? Does it mean the system notification with a question and a choice ? In this case do you have an example of implementation in another project ?

By that, I mean a notification shown inside Elisa main window and that do not block the user from doing its task.

  • I did a first try where I could restore the playlist and the song in the player. Do I need to restore the position of the player as well ?

This is indeed a good question. I would say probably not except if it is easily done. At least, we have to help an user mistakenly clearing a playlist. If we can be even better, this is good.

All the best

Hello,

Sorry to have missed your first questions.

Hi,

Finally, I could use KNotification to generate on the clear action a system notification with an undo choice (the file elisa.notifyrc may be particular for the packaging, KNotificationGlobalConfigFile).

I pushed my changes on my forked repo, branch T5376 : jeje42_T5376 .

I am not sure we want a notification done with KNotification outside of the main Elisa window. That would somehow cut the link between the application the user is interacting with and the action to perform.

Could you try to push a review using phabricator ?

I believe this page explains how to do it: https://community.kde.org/Infrastructure/Phabricator

I tried to be as generic as possible on the function MediaPlayList::undoClearPlayList .

Best,
Jerome

Best regards and thanks for your work

Hi,

Thank you for your replies, I could push a diff: https://phabricator.kde.org/D19610 . I tried to follow the instructions as much as possible :)

I could finally restore the player position, like it is done when the persistent state is restored when the application starts up.

Best regards

jguidon moved this task from In Progress to Done on the Elisa board.Tue, Apr 16, 3:22 PM
mgallien closed this task as Resolved.Thu, Apr 18, 3:28 PM