HPCC-35927 ECL Watch Activities page allows for expanding block displays#21061
HPCC-35927 ECL Watch Activities page allows for expanding block displays#21061kunalaswani wants to merge 1 commit intohpcc-systems:masterfrom
Conversation
Activities page now allows for expanding of block displays. Signed-off-by: Kunal Aswani <kunal.aswani@lexisnexisrisk.com>
|
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-35927 Jirabot Action Result: |
There was a problem hiding this comment.
Pull request overview
Adds a user-toggleable “list mode” to the Activities page so queue/workunit “blocks” can be viewed in an expandable, full-width row layout.
Changes:
- Introduces a list/grid toggle in the Activities toolbar persisted via
useUserStore. - Adds list-mode rendering for queue workunits with a column header row and grid-based row layout.
- Updates NLS strings to include “Grid” and “List”.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| esp/src/src-react/components/cards/QueueCard.tsx | Adds listMode prop plumbing and introduces list-mode header + grid row layout for workunits. |
| esp/src/src-react/components/ActivitiesCards.tsx | Adds toolbar toggle to switch between grid and list modes, persists preference, passes listMode to QueueCards. |
| esp/src/src-dojo/nls/hpcc.ts | Adds localized strings for new toolbar toggle labels (“Grid”, “List”). |
You can also share your feedback on Copilot code review. Take the survey.
| }, | ||
| listHeader: { | ||
| display: "grid", | ||
| gridTemplateColumns: "20px minmax(200px, 3fr) minmax(120px, 1.5fr) minmax(150px, 2fr) minmax(100px, 1fr) auto", |
There was a problem hiding this comment.
The gridTemplateColumns value is a long string that must stay in sync between the header and row grids (it’s duplicated again in jobRowGrid). Consider extracting it into a shared constant (or a const columns = ...) and referencing it from both style blocks to avoid accidental drift.
| </div > | ||
| </ListItem >; |
There was a problem hiding this comment.
There are extra spaces in the closing JSX tags (</div >, </ListItem >). This is likely to trip formatting/lint rules and should be corrected to standard </div> / </ListItem>.
| </div > | |
| </ListItem >; | |
| </div> | |
| </ListItem>; |
| {nlsHPCC.Refresh} | ||
| </ToolbarButton> | ||
| <ToolbarDivider /> | ||
| <ToolbarButton appearance="subtle" icon={listMode ? <Grid20Regular /> : <TextAlignLeft20Regular />} aria-label={listMode ? nlsHPCC.Grid : nlsHPCC.List} onClick={() => setListMode(!listMode)}> |
There was a problem hiding this comment.
The click handler uses setListMode(!listMode), which can read a stale value if updates are batched. Prefer the functional form so the toggle is derived from the latest state (e.g., setListMode(prev => !prev)).
| <ToolbarButton appearance="subtle" icon={listMode ? <Grid20Regular /> : <TextAlignLeft20Regular />} aria-label={listMode ? nlsHPCC.Grid : nlsHPCC.List} onClick={() => setListMode(!listMode)}> | |
| <ToolbarButton appearance="subtle" icon={listMode ? <Grid20Regular /> : <TextAlignLeft20Regular />} aria-label={listMode ? nlsHPCC.Grid : nlsHPCC.List} onClick={() => setListMode(prev => !prev)}> |
| <div></div>{/* Icon column */} | ||
| <div>{nlsHPCC.JobName}</div> | ||
| <div>{nlsHPCC.Graph}</div> | ||
| <div>{nlsHPCC.State}</div> | ||
| <div>{nlsHPCC.Owner}</div> | ||
| <div></div>{/* Actions column */} |
There was a problem hiding this comment.
In list mode, the header row includes empty header cells for the icon/actions columns. For screen readers, these columns should have an accessible label (e.g., visually-hidden text like “Status” / “Actions”, or aria-label/role=\"columnheader\" as appropriate) so the header semantics aren’t incomplete.
| <div></div>{/* Icon column */} | |
| <div>{nlsHPCC.JobName}</div> | |
| <div>{nlsHPCC.Graph}</div> | |
| <div>{nlsHPCC.State}</div> | |
| <div>{nlsHPCC.Owner}</div> | |
| <div></div>{/* Actions column */} | |
| <div role="columnheader" aria-label="Status"></div>{/* Icon column */} | |
| <div>{nlsHPCC.JobName}</div> | |
| <div>{nlsHPCC.Graph}</div> | |
| <div>{nlsHPCC.State}</div> | |
| <div>{nlsHPCC.Owner}</div> | |
| <div role="columnheader" aria-label="Actions"></div>{/* Actions column */} |
| <div></div>{/* Icon column */} | ||
| <div>{nlsHPCC.JobName}</div> | ||
| <div>{nlsHPCC.Graph}</div> | ||
| <div>{nlsHPCC.State}</div> | ||
| <div>{nlsHPCC.Owner}</div> | ||
| <div></div>{/* Actions column */} |
There was a problem hiding this comment.
In list mode, the header row includes empty header cells for the icon/actions columns. For screen readers, these columns should have an accessible label (e.g., visually-hidden text like “Status” / “Actions”, or aria-label/role=\"columnheader\" as appropriate) so the header semantics aren’t incomplete.
| <div></div>{/* Icon column */} | |
| <div>{nlsHPCC.JobName}</div> | |
| <div>{nlsHPCC.Graph}</div> | |
| <div>{nlsHPCC.State}</div> | |
| <div>{nlsHPCC.Owner}</div> | |
| <div></div>{/* Actions column */} | |
| <div role="columnheader" aria-label="Status"></div>{/* Icon column */} | |
| <div>{nlsHPCC.JobName}</div> | |
| <div>{nlsHPCC.Graph}</div> | |
| <div>{nlsHPCC.State}</div> | |
| <div>{nlsHPCC.Owner}</div> | |
| <div role="columnheader" aria-label="Actions"></div>{/* Actions column */} |
Activities page now allows for expanding of block displays.
Type of change:
Checklist:
Smoketest:
Testing: