Skip to content

Commit

Permalink
fix(JAQPOT-258): description field show 2 lines clamped (#52)
Browse files Browse the repository at this point in the history
* bugfix(JAQPOT-258): description field show 2 lines clamped

* fix: also clamp features description and results description
  • Loading branch information
alarv authored Sep 9, 2024
1 parent 836fe52 commit abf3146
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ export default function FeaturesTab({ model }: FeaturesTabProps) {
<TableRow key={index}>
<TableCell>
<Tooltip content={independentFeature.name}>
<div className="max-h-28 max-w-52 overflow-hidden text-ellipsis whitespace-nowrap">
<div className="line-clamp-2">
{independentFeature.name}
</div>
</Tooltip>
</TableCell>
<TableCell>{independentFeature.units}</TableCell>
<TableCell>
<Tooltip content={independentFeature.description}>
<div className="max-h-28 max-w-52 overflow-hidden text-ellipsis whitespace-nowrap">
<div className="line-clamp-2">
{independentFeature.description}
</div>
</Tooltip>
Expand Down
6 changes: 1 addition & 5 deletions src/app/dashboard/models/components/ModelsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ export default function ModelsTable({
const rows = data?.content?.map((model: ModelSummaryDto) => {
return {
...model,
description: (
<div className="max-h-28 max-w-52 overflow-hidden text-ellipsis whitespace-nowrap">
{model.description}
</div>
),
description: <div className="line-clamp-2">{model.description}</div>,
createdAt: <JaqpotTimeAgo date={model.createdAt as any} />,
sharedWithOrganizations: model.sharedWithOrganizations
.filter((org) => userOrganizationIds.includes(org.id))
Expand Down
4 changes: 3 additions & 1 deletion src/app/dashboard/models/components/SearchModelsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ export default function SearchModelsTable() {
>
<TableCell>{item.name}</TableCell>
<TableCell>{item.type}</TableCell>
<TableCell>{item.description}</TableCell>
<TableCell>
<div className="line-clamp-2">{item.description}</div>
</TableCell>
<TableCell>{item.independentFeaturesLength}</TableCell>
<TableCell>{item.dependentFeaturesLength}</TableCell>
<TableCell>{item.visibility}</TableCell>
Expand Down
4 changes: 1 addition & 3 deletions src/app/dashboard/results/components/ResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ export default function ResultsTable() {
</TableCell>
<TableCell>{getDatasetStatusNode(item)}</TableCell>
<TableCell>
<div className="max-h-28 max-w-52 overflow-hidden text-ellipsis whitespace-nowrap">
{JSON.stringify(item.input)}
</div>
<div className="line-clamp-2">{JSON.stringify(item.input)}</div>
</TableCell>
<TableCell>
{item.executedAt && (
Expand Down

0 comments on commit abf3146

Please sign in to comment.