gpouilloux / gnome-shell-extension-docker

An extension for managing docker containers
GNU General Public License v3.0
146 stars 71 forks source link

Add confirmation on container remove #61

Open alessandrodolci opened 4 years ago

alessandrodolci commented 4 years ago

Hello Guillaume,

here I am with the implementation of the confirmation dialog for the remove action.

I introduced a reusable component in a separate file, inheriting from Gnome Shell base ModalDialog, and added a new property to the actions dictionary, indicating whether an action needs the user to confirm for its execution. I also started worrying a bit about the hierarchy of source files at this point, but haven't had any change yet. I thought that maybe it could be reorganized by placing UI components in a dedicated folder, like this:

- src
    - ui
        - confirmationModal.js
        - dockerMenu.js
        - dockerMenuItem.js
        - dockerMenuStatusItem.js
        - dockerSubMenuMenuItem.js
    - docker.js
    - utils.js

I tested it against gnome-shell 3.36.3 on Ubuntu 20.04 and 3.28.4 on Ubuntu 18.04, and haven't experienced any particular issue.

As always, consider the implementation as a draft, and please feel free to propose changes if you don't like something, you know I don't want to overcome your voice on structure decisions for the project!

Have a good weekend, Alessandro

alessandrodolci commented 3 years ago

Hello @gpouilloux,

any update on this? Don't want to put any pressure, but it's been a while since I've heard from you, I hope everything's all right! Let me know if I can help with something, I'm always willing to keep working on this.

Alessandro

gpouilloux commented 3 years ago

Hi @alessandrodolci

Sorry, I've had little time to consider to this project. The implementation looks good to me, well done on this!

alessandrodolci commented 3 years ago

Hi!

That's very reasonable, I hope I haven't bothered you! Anyway, good, thank you for the feedback! I'll try to have a look on the remaining issues if I'll have the time.

Have a nice day, Alessandro