mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: truncate long MCP server names with tooltip on hover
- Add text truncation styles (overflow, text-overflow, white-space) to server name - Wrap server name span in StandardTooltip to show full name on hover - Add flexShrink: 0 to buttons container to prevent it from being pushed out Fixes #11188
This commit is contained in:
parent
7f6272afb9
commit
e989cc0358
1 changed files with 26 additions and 17 deletions
|
|
@ -267,24 +267,33 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
|
|||
style={{ marginRight: "8px" }}
|
||||
/>
|
||||
)}
|
||||
<span style={{ flex: 1 }}>
|
||||
{server.name}
|
||||
{server.source && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: "8px",
|
||||
padding: "1px 6px",
|
||||
fontSize: "11px",
|
||||
borderRadius: "4px",
|
||||
background: "var(--vscode-badge-background)",
|
||||
color: "var(--vscode-badge-foreground)",
|
||||
}}>
|
||||
{server.source}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
<StandardTooltip content={server.name}>
|
||||
<span
|
||||
style={{
|
||||
flex: 1,
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
minWidth: 0,
|
||||
}}>
|
||||
{server.name}
|
||||
{server.source && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: "8px",
|
||||
padding: "1px 6px",
|
||||
fontSize: "11px",
|
||||
borderRadius: "4px",
|
||||
background: "var(--vscode-badge-background)",
|
||||
color: "var(--vscode-badge-foreground)",
|
||||
}}>
|
||||
{server.source}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</StandardTooltip>
|
||||
<div
|
||||
style={{ display: "flex", alignItems: "center", marginRight: "8px" }}
|
||||
style={{ display: "flex", alignItems: "center", marginRight: "8px", flexShrink: 0 }}
|
||||
onClick={(e) => e.stopPropagation()}>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue