dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
39.16k stars 3.38k forks source link

Cancel button in Driver Manager is not respected #18147

Open igor2x opened 1 year ago

igor2x commented 1 year ago

Description

  1. In Driver Manager if deleting or updating the driver and then in dialog click on Cancel and I expect setting to be discharged, but there are not it looks like OK button is clicked.

DBeaver Version

Community Edition 22.2.4

Operating System

Windows 10

Database and driver

  1. Database name and version: Db2 v11.5.8.0
  2. Driver name and version: JDBC v4.31.10 and v4.32.28

Steps to reproduce

  1. Start DBeaver and menu Database | Driver Manager.
  2. DB2 | DB2 LUW and Edit button.
  3. Libraries tab.
  4. Download/Upgrade button.
  5. In Download driver files dialog from **Version* column select e.g. 11.5.8.0 and Download** button and the following is displayed as expected: image
  6. Now click on Cancel button.
  7. Parent dialog Driver Manager is displayed. Click on Edit button (because DB2 LUW is already selected from step 2).
  8. Libraries tab and problem appears it is displayed the same as in step 5 dialog. Because is step 6 I have clicked on Cancel button, I expect all the settings I have performed in that Edit Driver dialog is discharged, but it looks like there are not, which is the problem.

If there is no intention to have a discharged functionality there should be no two buttons Cancel and OK, but instead only one Close.

Additional context

No response

LonwoLonwo commented 1 year ago

Hello @igor2x

I'm not sure about this case.

2022-11-08 17_58_08-Cancel button in Driver Manager is not respected · Issue #18147 · dbeaver_dbeave

DBeaver has the Cancel button on this page. And you can cancel the operation there. But сhanges are considered applied after returning to the previous (Libraries) page.

igor2x commented 1 year ago

I am not talking about Cancel button from Download drivers file dialog, but Cancel button in Library tab. If I can't cancel all of the actions performed on Library tab, then in my humble opinion there should be no OK and Cancel buttons, because they have the same effect, but instead only single Close button.

In my humble opinion in each dialog with Cancel button every action performed inside this dialog or some sub-dialog should be fully canceled if Cancel button exists. If Cancel button does not revers any changes made since entering dialog, then what is the point of Cancel button?

igor2x commented 1 year ago

I have been looking into this issue and I see OK and Cancel buttons are valid for all of the tabs, not just Library tab.

It is not going to be easy to fix this behavior, not to cancel out driver update. Maybe just put some "warning" like I have seen in other preferences dialogs, something like:

image At picture above on the button I have added "i" icon and "After update..." text. Probably some similar wording, I am not a native English speaker, so you will find better wording.

If this is implemented with "info" added, then I am satisfied and problem report can be closed down.