Fixes #39051 - Add expandable info to leapp reports#166
Fixes #39051 - Add expandable info to leapp reports#166kmalyjur wants to merge 1 commit intotheforeman:masterfrom
Conversation
f20e0f3 to
df9db42
Compare
df9db42 to
84dd285
Compare
There was a problem hiding this comment.
Pull request overview
Adds row-level expansion (and an expand-all control) to the Leapp preupgrade report table shown on the job invocation detail page, rendering additional per-entry details when expanded.
Changes:
- Add expandable row rendering for Leapp report entries and manage expanded-row state.
- Introduce a
ReportDetailscomponent to display expanded per-entry metadata (summary/tags/links/remediations). - Add/extend RTL tests to cover section expansion, row expansion, expand-all, pagination, and non-Leapp jobs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| webpack/components/PreupgradeReportsTable/index.js | Implements outer section expansion + inner expandable table rows (including expand-all wiring). |
| webpack/components/PreupgradeReportsTable/tests/PreupgradeReportsTable.test.js | Adds tests for expanded content, expand-all, pagination, and rendering conditions. |
| webpack/components/PreupgradeReportsTable/ReportDetails.js | New expanded-row details renderer (description list with labels/links/remediations). |
| webpack/components/PreupgradeReportsTable/PreupgradeReportsTable.scss | Styles to preserve whitespace in expanded detail descriptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
webpack/components/PreupgradeReportsTable/__tests__/PreupgradeReportsTable.test.js
Show resolved
Hide resolved
webpack/components/PreupgradeReportsTable/__tests__/PreupgradeReportsTable.test.js
Outdated
Show resolved
Hide resolved
| /> | ||
| childrenOutsideTbody | ||
| onExpandAll={onExpandAll} | ||
| areAllRowsExpanded={!areAllRowsExpanded} |
There was a problem hiding this comment.
areAllRowsExpanded is computed as “all visible rows are expanded”, but the value passed into <Table areAllRowsExpanded={...}> is negated (!areAllRowsExpanded). This makes the prop semantics inconsistent and can cause the expand-all toggle UI (label/aria state) to be out of sync with the actual row expansion state. Pass the non-negated value, or (if the Table prop expects the inverse) rename either the prop or the local variable to match the meaning to avoid incorrect behavior.
| areAllRowsExpanded={!areAllRowsExpanded} | |
| areAllRowsExpanded={areAllRowsExpanded} |
There was a problem hiding this comment.
Could the comment state that this is per PF instructions? when I saw it I thought we had a bug in out table handling
webpack/components/PreupgradeReportsTable/PreupgradeReportsTable.scss
Outdated
Show resolved
Hide resolved
84dd285 to
f0beee4
Compare
f0beee4 to
318fa5a
Compare
318fa5a to
f320e88
Compare

Adds expanding functionality and expandable information to the new Leapp preupgrade report table on the job invocation detail page.
Before:

After:

The test was created with the help of AI.