Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1160307

Summary: [RFE] support free-flowing form layout for dialog widgets
Product: [oVirt] ovirt-engine Reporter: Daniel Erez <derez>
Component: RFEsAssignee: bugs <bugs>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: acanan, bugs, gklein, gshereme, iheim, lsurette, mgoldboi, rbalakri, srevivo, ykaul
Target Milestone: ---Keywords: FutureFeature, Improvement, UserExperience
Target Release: ---Flags: ylavi: ovirt-future?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-29 23:51:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1149466, 1149488    
Attachments:
Description Flags
screen-cast: resizing ovirt login page (PatternFly)
none
Import VM dialog - English vs. Spanish none

Description Daniel Erez 2014-11-04 14:24:05 UTC
Description of problem:
Widgets with label [*] that are used across various dialogs should support
auto-fit width (i.e. extend/shrink automatically to fit label text). That enhancement would improve dialogs appearance and consistency on different localizations.

[*] mostly derivatives of AbstractValidatedWidgetWithLabel

Version-Release number of selected component (if applicable):
3.5

How reproducible:
100%

Additional info:
See examples of the issue on bug 1149488 and bug 1149466.

Comment 1 Daniel Erez 2014-11-04 14:26:49 UTC
*** Bug 1149488 has been marked as a duplicate of this bug. ***

Comment 2 Einav Cohen 2014-11-04 15:01:20 UTC
May be improved when using Bootstrap grids.

Comment 3 Einav Cohen 2014-11-04 15:02:18 UTC
Created attachment 953649 [details]
screen-cast: resizing ovirt login page (PatternFly)

Comment 4 Einav Cohen 2014-11-04 20:37:02 UTC
Greg: I think that there is already some behavior that dynamically controls fields' width as well as distance between a field and its label, as seen in attachment 953649 [details] (I am not sure if the fields' labels are actually somehow associated with the field widgets themselves or not); so when applying PatternFly and changing fields within dialogs to be PatternFly fields - shouldn't we expect the same behavior? [BTW - not sure if Bootstrap grids are in use in this page or not].

Comment 5 Daniel Erez 2014-11-04 20:51:49 UTC
Just note that the label should be re-sized automatically rather than the text-box. Doesn't seem like the login screen currently support it, changing languages doesn't affect label's width. I.e. the width is predefined to accommodate longest value (similar to the widgets in the dialogs).

Comment 6 Greg Sheremeta 2014-11-04 21:23:58 UTC
Yes, login page uses the bootstrap grid.

The form is configured like so:

<div class="col-sm-7 col-md-6 col-lg-5 ...">

This means, roughly: "take up 7 columns when the screen is small. Take up 6 columns when the screen is medium. Take up 5 columns when the screen is large."

When you resize the page to transition from "medium" to "large", so see the snapping-to-grid happen.

I think I disagree with the proposal of this BZ. I think that labels and widgets should snap to the grid. That way, labels will all be left-aligned, and widgets will all be left-aligned in the next column over.

We probably have some big-idea form design to do.

Comment 7 Einav Cohen 2014-11-04 22:31:11 UTC
Created attachment 953865 [details]
Import VM dialog - English vs. Spanish

Comment 8 Einav Cohen 2014-11-04 22:42:55 UTC
I believe that we would want to avoid situations like the one depicted in attachment 953865 [details] in the English section - there is just too much space between the field-label and the field itself when displaying this particular dialog in English. would you agree?
[in that sense, I think that Daniel's solution suggestion is a valid one]

If indeed we all agree that there is a problem here: I am trying to find out whether using Bootstrap grids will resolve this situation or not; IIUC: if each column (within the Bootstrap grid) will have a 'static' width, we will probably remain with the same issue. 

any additional thoughts/suggestions? anything that I am missing?

Comment 9 Greg Sheremeta 2014-11-05 00:19:20 UTC
Bootstrap grids will not resolve that situation. They will perpetuate it, in fact. Positions will still be static, set to X number of columns by the developer.

It's really no different than if we said something like: all form elements can only be 20, 40, 60, 80, or 100px wide, and they must all start at either 0, 20, 40, 60, or 80px from the left. Currently we're all over the place (e.g. 238px for form fields) -- grids just add known, predictable numbers.

This is a UXD issue, and something we should study and design.

I find columns, predictable positioning, etc. pleasing to the eye. A common solution to this space-between problem is to right-align the labels. Another solution would be to wrap the labels. IMHO letting the forms flow dynamically creates unpredictability and eventually a mess -- and I do think they are pretty messy at the moment. Free-flow also makes it very difficult for mobile devices and other small screens.

(I believe the term "responsive design" in the title of the BZ is misused. Responsive design means adapting to different devices and screen sizes. This should be titled something like "support free-flowing form layout". I hope you don't mind if I change it.)

Comment 10 Einav Cohen 2014-11-05 12:31:26 UTC
all valid points. thanks, Greg.

Comment 11 Einav Cohen 2015-06-07 17:20:02 UTC
was not touched for ~180 days, but still relevant (post 3.6) - especially once dialogs will adopt the PatternFly styling.

Comment 13 Greg Sheremeta 2016-11-29 23:51:37 UTC
Closing, as we've decided to implement Bootstrap grids wherever possible.