-
Notifications
You must be signed in to change notification settings - Fork 768
Add tooltip for URL field #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tooltip for URL field #488
Conversation
A quick way to see the full URL if it's cut off Inspired by @cliffhall's [comment](modelcontextprotocol#459 (comment))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Display tooltip if sseUrl
is set.
client/src/components/Sidebar.tsx
Outdated
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<Input | ||
id="sse-url-input" | ||
placeholder="URL" | ||
value={sseUrl} | ||
onChange={(e) => setSseUrl(e.target.value)} | ||
className="font-mono" | ||
/> | ||
</TooltipTrigger> | ||
<TooltipContent> | ||
{sseUrl || `Enter URL to MCP server`} | ||
</TooltipContent> | ||
</Tooltip> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make the tooltip only display if sseUrl
is not null/undefined. It would seem odd to have this one place where a tooltip comes up over an empty field.
<Tooltip> | |
<TooltipTrigger asChild> | |
<Input | |
id="sse-url-input" | |
placeholder="URL" | |
value={sseUrl} | |
onChange={(e) => setSseUrl(e.target.value)} | |
className="font-mono" | |
/> | |
</TooltipTrigger> | |
<TooltipContent> | |
{sseUrl || `Enter URL to MCP server`} | |
</TooltipContent> | |
</Tooltip> | |
{ sseUrl && <Tooltip> | |
<TooltipTrigger asChild> | |
<Input | |
id="sse-url-input" | |
placeholder="URL" | |
value={sseUrl} | |
onChange={(e) => setSseUrl(e.target.value)} | |
className="font-mono" | |
/> | |
</TooltipTrigger> | |
<TooltipContent> | |
{sseUrl} | |
</TooltipContent> | |
</Tooltip> } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2ecfdb0.
Done in 2ecfdb0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but needs a prettier-fix
run to pass CI.
Updated. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Motivation and Context
A quick way to see the full URL if it's cut off
Inspired by @cliffhall's comment
How Has This Been Tested?
Enter URL to MCP server
Breaking Changes
Types of changes
Checklist
Additional context