Ticket #2209 (closed defect: fixed)

Opened 8 weeks ago

Last modified 7 weeks ago

A Label does not affect the width of a GridLayout

Reported by: Artur Signell Owned by: Matti Tahvonen
Priority: major Milestone: User Interface Library 5.3.0 RC
Component: gwt-adapter-client Version: trunk
Keywords: Cc:
Known Issue description:
Hours estimate: Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: no Contract:

Description (last modified by Matti Tahvonen) (diff)

A label does not always affect the width of a GridLayout?. See test case.

Change History

Changed 8 weeks ago by Artur Signell

Test case in [5912]

Changed 8 weeks ago by Matti Tahvonen

  • description modified (diff)
  • summary changed from GridLayout render inconsistencies to A Label does not affect the width of a GridLayout

Two separate issues. Split the other one to #2210

Changed 7 weeks ago by Matti Tahvonen

  • status changed from new to closed
  • resolution set to wontfix

I believe this is actually the only sane way for gridlayout to act.

Label and all other components affects column widths only by their true minimum widths. Basically components are rendered to 0px x 0px cells to measure the true minimum width. With text content this will cause rather tall grids unless width is defined, but in most of these cases it will be 100%.

Column expansions etc. will not work sane if this is changed. Workaround would be to have two different layout modes for grids with width and no width.

BTW. IOrderedLayout wraps text in similar manner, but not to minimum width but "500%" css width.

Changed 7 weeks ago by Artur Signell

  • status changed from closed to reopened
  • resolution deleted

Completely disagree.

All components should be given theoretically unlimited space to render themselves i.e the container can be 0px high but not 0px wide. The component is then measured and that is used as the width (minimum width for column in the GridLayout? case). Otherwise it is impossible to add for instance a header "Total sum" with whitespace and have a column with values shorter than "Total sum" below it. If the user wants a label to be as wide as the other components in the column the width should be set to 100%.

This is how OrderedLayout? works, see Ticket2209OL added in [5928].

Changed 7 weeks ago by Jouni Koivuviita

The "Total sum" case Artur mentioned is easily avoided by using a non-breaking-space character between the 'L' and 'S'.

Changed 7 weeks ago by Artur Signell

IOrderedLayout fixes in [5940] and [5942]. Should now work in all cases without wrapping.

Changed 7 weeks ago by Matti Tahvonen

  • status changed from reopened to closed
  • resolution set to fixed

since [5940] rendered to 10 000 000 px div. Will cause some odd situation for developers ("where is my other column?"), but sure works like IOrderedLayout now.

Proper way to add long texts to grid now is to define label as 100% width (and most likely also for grid itself).

Note: See TracTickets for help on using tickets.