Bug 1161460 - Inconsistent behavior of YaST modules when closing without changes
Inconsistent behavior of YaST modules when closing without changes
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other Other
: P5 - None : Minor (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/UlVLiDTU
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-21 20:03 UTC by macias -
Modified: 2021-03-09 12:59 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description macias - 2020-01-21 20:03:11 UTC
Run yast, then run services manager, after the window appears close it. You will get dialog "Really abort".

1) there is no changes to apply, so quitting without applying or with applying changes makes no difference
2) this is not consistent with the rest of yast tools
Comment 1 Ancor Gonzalez Sosa 2020-01-22 10:59:13 UTC
(In reply to macias - from comment #0)
> Run yast, then run services manager, after the window appears close it. You
> will get dialog "Really abort".
> 
> 1) there is no changes to apply, so quitting without applying or with
> applying changes makes no difference
> 2) this is not consistent with the rest of yast tools

Actually this is so consistent with the rest of YaST that it even uses a shared dialog, as you can see here:
https://github.com/yast/yast-services-manager/blob/1b9392b0ddb14b9fee952b1d52d15216079da577/src/lib/services-manager/dialogs/services_manager.rb#L374

If nothing has changed, the dialog just says: "Really abort?", but if some change has been made, it will add "All changes will be lost!". See here the implementation of this dialog that is, as mentioned, used in several YaST modules when the "Cancel" button is pressed:
https://github.com/yast/yast-yast2/blob/66bc64d08c6ff017b88e3cff63fd02d78bbcf7f1/library/general/src/modules/Popup.rb

So this works as designed.
Comment 2 macias - 2020-02-01 13:21:45 UTC
> Actually this is so consistent with the rest of YaST that it even uses a shared 
> dialog

The fact some piece of code is shared does not mean it is actually USED the same way. So I stand exactly where I wrote this report.

The question serves no purpose, there were no changes, so there is no loss when quitting the app and the app is non-consistent with the rest of Yast.

Issue: does app ask when no changes were made and user quits it:
NO -- Fonts
NO -- Date and Time
NO -- Printer
NO -- Keyboard Layout
NO -- Hardware information
NO -- Software repositories
NO -- Add-On Products
(I skipped the rest as it seems obvious too me)
and
YES -- Services manager

I say it is inconsistent behavior.
Comment 3 Ancor Gonzalez Sosa 2020-02-03 14:40:43 UTC
(In reply to macias - from comment #2)
> > Actually this is so consistent with the rest of YaST that it even uses a shared 
> > dialog
> 
> The fact some piece of code is shared does not mean it is actually USED the
> same way. So I stand exactly where I wrote this report.
> 
> The question serves no purpose, there were no changes, so there is no loss
> when quitting the app and the app is non-consistent with the rest of Yast.
> 
> Issue: does app ask when no changes were made and user quits it:
> NO -- Fonts
> NO -- Date and Time
> NO -- Printer
> NO -- Keyboard Layout
> NO -- Hardware information
> NO -- Software repositories
> NO -- Add-On Products
> (I skipped the rest as it seems obvious too me)
> and
> YES -- Services manager
> 
> I say it is inconsistent behavior.

You found 6 examples in which YaST acts in one way.

Doing this search[1] I found many more examples of what you have pointed (modules that quit without asking)... but I also found examples of modules that act like Services Manager does:

- Services Manager
- Firewall
- Mail
- NIS Server

So I will open the discussion in YaST devel. We need to make it consistent at several levels. Specially because it looks like the majority of YaST modules has decided to use the shared dialog... but bypassing its behavior. The API should do what the majority needs. Instead of that, we have a majority just cheating the API.
Comment 4 Ancor Gonzalez Sosa 2020-02-03 14:41:23 UTC
(In reply to Ancor Gonzalez Sosa from comment #3)
> 
> Doing this search[1] I found many more examples of what you have pointed

[1] https://github.com/search?p=5&q=org%3Ayast+reallyabort&type=Code
Comment 5 Ancor Gonzalez Sosa 2021-03-09 12:59:59 UTC
Updating the status to fit our search filters. This task is still queued in the YaST Team backlog.