You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "mattcasters (via GitHub)" <gi...@apache.org> on 2026/06/29 20:33:19 UTC

[PR] issue #7220 : dialogs are sized too large when a table view has many … (hop)

mattcasters opened a new pull request, #7370:
URL: https://github.com/apache/hop/pull/7370

   ### **PR Description / Recap**
   
   #### **Root Cause**
   1. **Unbounded Table Height Calculation**: Both the **Parameters** and **Variables** sections in the **Run Options** configuration dialog use `TableView` instances. The preferred height of an SWT `Table` grows proportionally with the number of items (`num_rows * row_height`). If a workflow/pipeline has many parameters or variables, the table requests an excessively large vertical height (often 800px+).
   2. **Initial Shell Packing**: When the dialog is opened for the first time (or when positions are reset), the codebase executes `shell.pack()`. This forces the window shell to match the absolute preferred height of its children, causing the dialog to extend off-screen and rendering the header and footer buttons (such as **Launch** and **Cancel**) inaccessible on typical displays and scaled screen setups.
   
   ---
   
   #### **Implemented Solution**
   We resolved this by capping the preferred height of the `TableView` widget at a sensible threshold and dynamically scaling it to adapt to different resolutions and zoom configurations:
   
   1. **Declared `HEIGHT_HINT_MAX_PX`**: Added a default maximum height hint of `350` pixels to [TableView.java](file:///home/matt/git/mattcasters/hop/ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java#L117-L119).
   2. **Updated `computeSize`**: Constrained the computed preferred height within `[HEIGHT_HINT_PX, HEIGHT_HINT_MAX_PX]` when the height hint `hHint` is `SWT.DEFAULT`.
   3. **High-DPI / Zoom Awareness**: Multiplied both the minimum and maximum height hints by `PropsUi.getNativeZoomFactor()`. This ensures the table height scales correctly on high-DPI monitors (e.g., 125%, 150%, 200% OS zoom) to remain readable, while preventing the layout from overflowing smaller screens.
   4. **Auto-Scroll Behavior**: If the table contains more rows than fit within the maximum height, the native SWT Table automatically enables its vertical scrollbar. The overall dialog shell now packs to a clean, readable height, and the bottom buttons remain fixed, visible, and fully interactive.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] issue #7220 : dialogs are sized too large when a table view has many items (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva merged PR #7370:
URL: https://github.com/apache/hop/pull/7370


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org