File tree Expand file tree Collapse file tree 2 files changed +25
-18
lines changed Expand file tree Collapse file tree 2 files changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ export const DOCKER_MCP_IMAGE = 'alpine/socat'
1010export const DOCKER_MCP_CONTAINER_ARGS = 'STDIO TCP:host.docker.internal:8811'
1111export const DOCKER_MCP_COMMAND = `docker run -i --rm ${ DOCKER_MCP_IMAGE } ${ DOCKER_MCP_CONTAINER_ARGS } `
1212
13- export const TILE_DESCRIPTION_MAX_LENGTH = 120 ;
14-
1513export const CATALOG_LAYOUT_SX = {
1614 width : '90vw' ,
1715 maxWidth : '1200px' ,
Original file line number Diff line number Diff line change 1- import { Tooltip , Typography } from "@mui/material" ;
2- import { CatalogItemRichened } from "../../types"
3- import { TILE_DESCRIPTION_MAX_LENGTH } from "../../Constants" ;
1+ import { Typography } from '@mui/material' ;
42
5- type CenterProps = {
6- item : CatalogItemRichened ;
7- }
3+ import type { CatalogItemRichened } from '../../types' ;
84
9- export default function Center ( { item } : CenterProps ) {
10- return (
11- < Tooltip title = { item . description } sx = { { height : '100%' } } >
12- < Typography variant = "body2" sx = { { color : 'text.secondary' , height : 50 } } >
13- { item . description ?. slice ( 0 , TILE_DESCRIPTION_MAX_LENGTH ) }
14- { item . description ?. length && item . description . length > TILE_DESCRIPTION_MAX_LENGTH && '...' }
15- </ Typography >
16- </ Tooltip >
17- )
18- }
5+ /*
6+ `Center` displays the description of the item in a truncated format.
7+ This should have been renamed to `Description`.
8+ */
9+ export default function Center ( { item } : { item : CatalogItemRichened } ) {
10+ return (
11+ < Typography
12+ variant = "body2"
13+ sx = { {
14+ color : 'text.secondary' ,
15+ // These CSS properties are used to create a multiline ellipsis effect: 3 lines maximum for the description
16+ display : '-webkit-box' ,
17+ textOverflow : 'ellipsis' ,
18+ overflow : 'hidden' ,
19+ WebkitBoxOrient : 'vertical' ,
20+ WebkitLineClamp : '3' ,
21+ height : 48 ,
22+ } }
23+ >
24+ { item . description ?? '' }
25+ </ Typography >
26+ ) ;
27+ }
You can’t perform that action at this time.
0 commit comments