PrestaShop icon indicating copy to clipboard operation
PrestaShop copied to clipboard

Add confirmation modal before module installation

Open yanmakouf opened this issue 1 year ago • 5 comments

Questions Answers
Branch? 8.0.x
Description? Add confirmation modal before install, upgrading or importing module. Warning user should go in maintenance mode before performing these actions due to cache potential issues
Type? improvement
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? resolves #28304
Related PRs N/A
How to test?

  1. Go to BO
  2. Go to Modules
  3. If installed, uninstall wishlist module
  4. Click "Install" button
  5. See confimation modal appears | Possible impacts? | N/A.

yanmakouf avatar Aug 11 '22 12:08 yanmakouf

Hello @yanmakouf!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

prestonBot avatar Aug 11 '22 12:08 prestonBot

This pull request seems to contain new translation strings. I have summarized them below to ease up review:

(Note: this is an automated message, but answering it will reach a real human)

prestonBot avatar Aug 11 '22 12:08 prestonBot

@khouloudbelguith You're right, let's replace the wording with "Upload" to stay consistent. Thanks!

Julievrz avatar Sep 15 '22 16:09 Julievrz

@khouloudbelguith I think issue 1 is not relevant, if you look at github ticket https://github.com/PrestaShop/PrestaShop/issues/28304 the scope changed. Issue 1 was not supposed to be solved

Confirmed with @MatShir

matks avatar Sep 16 '22 14:09 matks

Hello @khouloudbelguith and thank you for you review. I will fix Issue 2 and 3. I just have a question about issue 1 (maybe i misunderstood) as I can see in the original issue there is this small discussion between Mateus and Mathieu (#28304 (comment)) . As I understand it was agreed that "the global" solution would be fix in a later release, for now we just needed to improve the wording and adding some modals. Ping @MatShir @matks

I really think this PR should focus on the modal and not the original issue 👍

matks avatar Sep 20 '22 15:09 matks

Hello,

I need to switch focus to some new api project. So I may not be able to work on this the next few days/week. If anyone want to to take it up, be my guest :) Otherwise I'll come back on it after some time :) So as @khouloudbelguith said, we need to add the same modal to bulk actions of the modul manager. In order to adapt the text of the modal depending on the action (install, uninstall, upgrade...etc) we need to pass the value of the select field to the template. This seems to already be the case but is broken => Capture d’écran 2022-09-29 à 14 52 38 Capture d’écran 2022-09-29 à 14 52 21 When this will be fixed then we can pass the information Onclick() of the button <button class="btn btn-primary uppercase" data-dismiss="modal" id="module-modal-confirm-bulk-ack">{{ 'Yes, I want to do it'|trans({}, 'Admin.Modules.Feature') }}</button>

yanmakouf avatar Sep 29 '22 13:09 yanmakouf

Wording check done ☕️

l-delin avatar Jan 04 '23 08:01 l-delin

@NeOMakinG can you take a look ? :smile:

mflasquin avatar Jan 10 '23 17:01 mflasquin

As a store manager I must say I don't like this change at all. When I go to module page to install a module, I have to first click a button, then select/dragndrop a file. Isn't this a double confirmation for what I want to do?

Why do I have to click on one more button? Cmon...

If there should be a new message, it could have been in the modal with module selection.

BTW, not sure for what this is anyway, everybody installs modules in normal mode and nor me or my colleagues never seen an issue with it. 🤷‍♂️

Hlavtox avatar Jan 10 '23 18:01 Hlavtox

I also think requiring confirmation for install is an overkill, but for upgrades there should be the same modal you get in Updates tab, when maintenance mode isn't on.

It should be up to the module itself to not render anything unless required configuration is done (eg. ps_bankwire is broken like that: payment option available right after install even when there's no bank account information provided). But for upgrading you probably already have module configured so upgrade can break something and/or require the cache cleared.

SharakPL avatar Jan 11 '23 07:01 SharakPL

Hi @yanmakouf,

I have tested your PR and I'm very embarrassed because I couldn't find any confirmation mode to install/upload a module. As you can see. Could you confirm that my test method is correct?

Thanks!

https://watch.screencastify.com/v/gmBK6QOIxL401gz4owyL

paulnoelcholot avatar Jan 16 '23 16:01 paulnoelcholot

Suggestions from @Hlavtox and @SharakPL should be checked by @PrestaShop/product-team

matks avatar Jan 24 '23 08:01 matks

To elaborate - All these modals, popups and extra “UX improvements” is just punishing and slowing down users that know how to use this software. (Which everybody will eventually become in some weeks of using Prestashop, even the non tech people.)

In every other software in the world, new users must look into the manual, take some course and learn.

Does a newbie know how to use Photoshop, AutoCAD, Blender? No, he must learn. Maybe an extreme example, but what would the experienced users say if there was a warning popup shown when selecting tool XY saying “This can mess up your image, do you want to continue?”.

Hlavtox avatar Jan 24 '23 10:01 Hlavtox

However, a thing that would satisfy both parties would be “dont show again” checkbox.

Hlavtox avatar Jan 24 '23 10:01 Hlavtox

However, a thing that would satisfy both parties would be “dont show again” checkbox.

This would indeed be a good thing.

To elaborate - All these modals, popups and extra “UX improvements” is just punishing and slowing down users that know how to use this software. (Which everybody will eventually become in some weeks of using Prestashop, even the non tech people.)

It is an endless debate :) software has new users and experienced users. New users need guidance, help, warnings while experienced users know what they are doing and don't care about this. But they receive the same product.

matks avatar Feb 03 '23 10:02 matks

Closed in favor of #31820

jolelievre avatar Mar 23 '23 08:03 jolelievre