Fleet UI: More truncation fixes after QA (#28209)

This commit is contained in:
RachelElysia 2025-04-14 14:41:09 -04:00 committed by GitHub
parent c91beea408
commit c70c00cedc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 25 additions and 26 deletions

View file

@ -65,7 +65,7 @@ const generateDefaultTableHeaders = (
);
}
const { name, os_version_id } = cellProps.row.original;
const { name, os_version_id, platform } = cellProps.row.original;
const softwareOsDetailsPath = getPathWithQueryParams(
PATHS.SOFTWARE_OS_DETAILS(os_version_id),
@ -83,12 +83,9 @@ const generateDefaultTableHeaders = (
<LinkCell
path={softwareOsDetailsPath}
customOnClick={onClickSoftware}
value={
<>
<SoftwareIcon name={cellProps.row.original.platform} />
<span className="software-name">{name}</span>
</>
}
tooltipTruncate
prefix={<SoftwareIcon name={platform} />}
value={name}
/>
);
},

View file

@ -1,3 +1,5 @@
/** software/titles/:id > Second section */
import React, { useCallback, useContext, useState } from "react";
import PATHS from "router/paths";

View file

@ -245,14 +245,13 @@ const SoftwareTable = ({
};
const handleRowSelect = (row: IRowProps) => {
if (row.original.id) {
const path = getPathWithQueryParams(
PATHS.SOFTWARE_TITLE_DETAILS(row.original.id.toString()),
{ team_id: teamId }
);
if (!row.original.id) return;
router.push(path);
}
const detailsPath = showVersions
? PATHS.SOFTWARE_VERSION_DETAILS(row.original.id.toString())
: PATHS.SOFTWARE_TITLE_DETAILS(row.original.id.toString());
router.push(getPathWithQueryParams(detailsPath, { team_id: teamId }));
};
const renderSoftwareCount = () => {

View file

@ -44,12 +44,9 @@ const generateColumnConfigs = (
return (
<LinkCell
path={path}
value={
<>
<SoftwareIcon name={platform} />
<span className="os-version-name">{name}</span>
</>
}
tooltipTruncate
prefix={<SoftwareIcon name={platform} />}
value={name}
/>
);
},

View file

@ -43,12 +43,9 @@ const generateColumnConfigs = (
return (
<LinkCell
path={path}
value={
<>
<SoftwareIcon name={name} />
<span className="vuln-sw-name">{name}</span>
</>
}
tooltipTruncate
prefix={<SoftwareIcon name={name} />}
value={name}
/>
);
},

View file

@ -241,6 +241,13 @@ $max-width: 2560px;
z-index: 100;
line-height: 1.375;
white-space: initial;
// Hyphenated words will still break at hyphens first
// while non-hyphenated strings will break only when necessary
overflow-wrap: break-word; // Preferred property for modern browsers
word-wrap: break-word; // Fallback for older browsers e.g. IE
word-break: break-word; // Ensures words break when necessary
p {
margin: 0;
}