Bug 1143558

Summary: scrollbar resets when selecting role
Product: [openSUSE] openSUSE Tumbleweed Reporter: Arvin Schnell <aschnell>
Component: YaST2Assignee: YaST Team <yast-internal>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ancor, aschnell, jlopez, mvidner
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/YNjBYHWY
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot before selecting role
YaST logs files

Description Arvin Schnell 2019-07-31 08:01:28 UTC
In the dialog to select the role I have to scroll down to see all roles.
When I then select a role the scrollbar jumps back to the top and the
selected role is not even visible anymore.
Comment 1 Arvin Schnell 2019-07-31 08:02:01 UTC
Created attachment 812237 [details]
screenshot before selecting role
Comment 2 Arvin Schnell 2019-07-31 08:02:35 UTC
Created attachment 812238 [details]
YaST logs files
Comment 3 José Iván López González 2019-07-31 08:33:13 UTC
Martin, please, could you have a look? I am not sure if this is something we can easily fix. Thanks.
Comment 4 Martin Vidner 2019-07-31 08:44:38 UTC
Thanks for the report.

Yes. It's because libyui has no concept of a scrollable VBox.

Therefore we simulate one with a RichText widget[1]. When you select a role, we have to replace the text to put the selected "radio button" in the right place. Replacing resets the scroll bar.

[1]: https://github.com/yast/yast-installation/blob/b7e93db8a3223d3d47e989e491348f2761c07430/src/lib/installation/select_system_role.rb#L270
Comment 5 Martin Vidner 2019-07-31 08:50:01 UTC
One way to fix this would be adding a scrollable VBox to libyui. We can add it to the backlog and do it, because we have seen sometimes it is needed.
Comment 6 Arvin Schnell 2019-07-31 08:52:16 UTC
We could also make the RichText widget remember the scrollbar when setting
new content.
Comment 7 Ancor Gonzalez Sosa 2019-12-02 12:04:46 UTC
This is now fixed. See https://github.com/yast/yast-installation/pull/827