When the process name is too long, it pushes the 3 action buttons (favorite, quick launch, close) out of the card, breaking the layout.
- Changed
flex-wrapfromwraptonowrapto prevent unwanted wrapping - Added
flex: 1to make it take available space - Added
min-width: 0to allow flex items to shrink properly
- Added
flex-shrink: 0to keep it fixed width - Added
white-space: nowrapto prevent wrapping
- Added
flex: 1to make it take available space - Added
min-width: 0to allow it to shrink - Added
max-width: 200pxto prevent it from taking all space - Added
overflow: hiddento hide overflow - Added
text-overflow: ellipsisto show ellipsis (...) for truncated text - Added
white-space: nowrapto prevent wrapping - Added
word-wrap: break-wordfor word wrapping - Added
overflow-wrap: break-wordfor overflow wrapping - Added
word-break: break-wordfor word breaking
- Added
flex-shrink: 0to keep it fixed width - Added
white-space: nowrapto prevent wrapping
- Added
flex-shrink: 0to keep it fixed width - Added
align-items: centerfor proper alignment
- Added
width: 100%to ensure it takes full width
- Added
width: 100%to.port-card-main-info - Changed
flex-wraptowrapfor better mobile layout - Reduced
max-widthof.port-process-nameto150px
- Changed
.port-card-main-infotoflex-direction: column - Set
.port-process-namemax-widthto100%andwidthto100%
Added title attribute to the process name span:
<span className="port-process-name" title={port.processName || 'Unknown Process'}>
{port.processName || 'Unknown Process'}
</span>This provides a tooltip so users can see the full process name when hovering over truncated text.
- Text Wrapping: Long process names now properly wrap and truncate with ellipsis
- Layout Stability: Action buttons stay within card boundaries regardless of process name length
- User Experience: Tooltip shows full process name on hover
- Responsive: Works properly on all screen sizes
- Flexbox Optimization: Proper flex properties ensure correct spacing and alignment
A test HTML file (test_portcard.html) has been created to verify the fix with:
- Normal process names
- Long process names
- Very long process names
- Multiple cards with different lengths
The test demonstrates that:
- Process names truncate with ellipsis when too long
- Action buttons stay in position
- Full process name is visible on hover
- Layout remains stable across different name lengths