Skip to content

Commit

Permalink
feat: show tooltip with the complete value of Commit/Tag column
Browse files Browse the repository at this point in the history
On TreeListingPage show tooltip with the complete value of
Commit/Tag column on hover
  • Loading branch information
lfjnascimento committed Oct 23, 2024
1 parent 47b25d2 commit 65f9121
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions dashboard/src/components/Table/TreeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ const TreeTableRow = (row: TreeTableBody): JSX.Element => {
[row.id, row.url, row.branch, row.tree_name, row.commitName, origin],
);

const tagOrCommitHash = row.commitName ? row.commitName : row.commitHash;

return (
<TableRow>
<TableCellWithLink
Expand All @@ -117,12 +119,17 @@ const TreeTableRow = (row: TreeTableBody): JSX.Element => {
>
{sanitizeTableValue(row.branch, false)}
</TableCellWithLink>
<TableCellWithLink
data-target="treeDetails.builds"
linkProps={linkProps('treeDetails.builds')}
>
{sanitizeTableValue(row.commitName ? row.commitName : row.commitHash)}
</TableCellWithLink>
<Tooltip>
<TooltipTrigger>
<TableCellWithLink
data-target="treeDetails.builds"
linkProps={linkProps('treeDetails.builds')}
>
{sanitizeTableValue(tagOrCommitHash)}
</TableCellWithLink>
</TooltipTrigger>
<TooltipContent>{tagOrCommitHash}</TooltipContent>
</Tooltip>
<TableCellWithLink
data-target="treeDetails.builds"
linkProps={linkProps('treeDetails.builds')}
Expand Down

0 comments on commit 65f9121

Please sign in to comment.