mattcasters opened a new pull request, #7483: URL: https://github.com/apache/hop/pull/7483
# ShowRowsDialog for static row display (#7434) ## Summary Adds `ShowRowsDialog` as a lightweight alternative to `PreviewRowsDialog` when the GUI only needs to display a **static** set of rows. `PreviewRowsDialog` remains the right tool for transform preview (streaming, “get more rows”, stop, logging). ## Motivation `PreviewRowsDialog` is oriented around transform preview: default messaging (“Rows of transform …”), bottom action buttons, and optional pause/resume semantics. Many call sites already have rows in memory and only need a read-only grid with a custom title and message. This PR introduces a focused dialog for that case and migrates a first set of static viewers. ## What changed ### New API `org.apache.hop.ui.core.dialog.ShowRowsDialog` ```java new ShowRowsDialog(parent, variables, title, message, rowMeta, rows).open(); ``` - Custom title and header message (appends `(N rows)`) - Read-only `TableView`, no bottom buttons (close via window chrome / Esc) - Empty input → simple information `MessageBox` - Binary formatting and cell display truncation aligned with preview conventions - Window size/position restored via `PropsUi` / `BaseDialog.defaultShellHandling` ### Call sites switched to `ShowRowsDialog` | Location | Use | |---|---| | `DatabaseExplorerDialog` | Table data preview | | `SqlEditor` | SELECT result sets | | `HopGuiPipelineGraph.showTransformOutputData()` | Sampled transform output after a run | | `DataSetEditor.viewData()` | View dataset rows (testing plugin) | | `ValidatePipelineUnitTestExtensionPoint` | Unit test validation result rows | ### Intentionally unchanged Interactive transform debug preview in `HopGuiPipelineGraph` (still uses `PreviewRowsDialog` for “get more rows” / stop) and other true preview flows in transform dialogs. ### Docs / i18n - Javadoc on `ShowRowsDialog` and `PreviewRowsDialog` clarifies when to use each - English strings for the new dialog and updated call sites ## Review focus 1. **API fit** — constructor/open contract is enough for static viewers; anything missing for future call sites? 2. **Migration choices** — are the switched sites clearly non-preview? Any other high-value static uses left on `PreviewRowsDialog`? 3. **UX** — no Close button is intentional (matches #7434); Esc / window close OK? 4. **Parity** — binary hex / display truncation borrowed from preview; full cell overlay / click-to-copy not ported (lighter dialog by design). ## Test plan - [ ] Database Explorer → preview table rows - [ ] SQL Editor → run SELECT and inspect results - [ ] Run a pipeline with GUI sampling → open transform output icon - [ ] Testing plugin: open a Data Set → **View** - [ ] Fail a unit test with golden dataset validation → results dialog - [ ] Empty table / empty dataset → information message, no empty grid - [ ] Confirm interactive debug preview (more rows / stop) still uses `PreviewRowsDialog` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
