Skip to content

[Lookout UI] Adding Copy All Button to Job ID Column#4648

Merged
mauriceyap merged 13 commits intoarmadaproject:masterfrom
Sigele:copy-button
Feb 3, 2026
Merged

[Lookout UI] Adding Copy All Button to Job ID Column#4648
mauriceyap merged 13 commits intoarmadaproject:masterfrom
Sigele:copy-button

Conversation

@Sigele
Copy link
Collaborator

@Sigele Sigele commented Jan 29, 2026

What type of PR is this?

Feature

What this PR does / why we need it

This PR adds a button in the jobID column of the Lookout UI to copy all visible Job IDs on the current page. This eliminates the need for users to copy IDs individually. I made minor changes to the HeaderTableCell attributes to ensure that the button remains visible when the column is resized to the minimum width.

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

@Sigele Sigele marked this pull request as ready for review January 29, 2026 19:05
@Sigele Sigele force-pushed the copy-button branch 2 times, most recently from 8049d81 to 478366a Compare January 30, 2026 15:27
textOverflow: "ellipsis",
whiteSpace: "nowrap",
overflow: "hidden",
<div
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has removed the conditional check for header.column.getCanSort(). The <TableSortLabel> component is now rendered unconditionally for all columns, including non-sortable ones. Please could you restore the conditional rendering so that <TableSortLabel> is only used when header.column.getCanSort() returns true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in subsequent commit here

Comment on lines +173 to +179
style={{
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: 6,
whiteSpace: "nowrap",
}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need overflow: 'hidden' here to prevent potential layout issues when content overflows e.g. long header text. Was there a visual reason why you removed this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal was to make sure that the copy button did not disappear when then column was resized to minimized width. Was able to restore coverflow hidden in this commit

Comment on lines +98 to +106
// job ID copy values
const isJobIdColumn = header.column.id === StandardColumnId.JobID
const jobsTable = header.getContext().table
const visibleRows = jobsTable.getRowModel().rows
const visibleRowsExist = visibleRows.length > 0
const allJobIds = visibleRows
.map((row) => row.original.jobId)
.filter(Boolean)
const copyContent = allJobIds.join(", ")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is logically correct, but I think this would be slightly cleaner

Suggested change
// job ID copy values
const isJobIdColumn = header.column.id === StandardColumnId.JobID
const jobsTable = header.getContext().table
const visibleRows = jobsTable.getRowModel().rows
const visibleRowsExist = visibleRows.length > 0
const allJobIds = visibleRows
.map((row) => row.original.jobId)
.filter(Boolean)
const copyContent = allJobIds.join(", ")
const copyContent = header.column.id === StandardColumnId.JobID
? header.getContext().table.getRowModel().rows
.map((row) => row.original.jobId)
.filter(Boolean)
.join(", ")
: ""

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed here

const remainingWidth = totalWidth - resizerWidth - borderWidth

// job ID copy values
const isJobIdColumn = header.column.id === StandardColumnId.JobID
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better if it were a configuration value in GET_JOB_COLUMNS() in internal/lookoutui/src/common/jobsTableColumns.tsx - perhaps:

accessorColumn({
    id: StandardColumnId.JobID,
    // ...
    additionalMetadata: {
        // ...
        allowCopyColumn: true,
    }
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed comment in this commit

Sigele Nickerson-Adams added 6 commits February 2, 2026 13:39
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Sigele Nickerson-Adams added 3 commits February 2, 2026 13:54
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
mauriceyap
mauriceyap previously approved these changes Feb 3, 2026
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Sigele Nickerson-Adams and others added 2 commits February 3, 2026 11:16
Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
@mauriceyap mauriceyap enabled auto-merge (squash) February 3, 2026 17:24
@mauriceyap mauriceyap merged commit fb77839 into armadaproject:master Feb 3, 2026
14 checks passed
dslear pushed a commit to dslear/armada that referenced this pull request Feb 9, 2026
)

Adds a button in the jobID column of the Lookout UI to copy all
visible Job IDs on the current page. This eliminates the need for users
to copy IDs individually. I made minor changes to the HeaderTableCell
attributes to ensure that the button remains visible when the column is
resized to the minimum width.

---------

Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Co-authored-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants