mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
fix: standardize all tooltips to match sidebar RowTooltip design
Wrapped every TooltipContent child in a font-mono text-xs tabular-nums text-stat-value span so all tooltips across the app share a consistent look. Previously some used plain text, others used <p> elements with different fonts and sizes.
This commit is contained in:
@@ -333,7 +333,7 @@ export function NodeManager() {
|
||||
<TooltipTrigger>
|
||||
<Star className="w-4 h-4 text-yellow-500 fill-yellow-500" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Default Node</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">Default Node</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
@@ -395,7 +395,7 @@ export function NodeManager() {
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
{new Date(summary.next_run_at).toLocaleString()}
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">{new Date(summary.next_run_at).toLocaleString()}</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
@@ -450,7 +450,7 @@ export function NodeManager() {
|
||||
<Calendar className="w-4 h-4" strokeWidth={1.5} />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>View Schedules</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">View Schedules</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
|
||||
@@ -469,7 +469,7 @@ export function NodeManager() {
|
||||
<Wifi className={`w-4 h-4 ${testing === node.id ? 'animate-pulse' : ''}`} />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Test Connection</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">Test Connection</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
@@ -488,7 +488,7 @@ export function NodeManager() {
|
||||
<Pencil className="w-4 h-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Edit Node</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">Edit Node</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
@@ -507,7 +507,7 @@ export function NodeManager() {
|
||||
<Trash2 className="w-4 h-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Delete Node</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">Delete Node</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
|
||||
@@ -384,7 +384,7 @@ function AlertsTab({ stackName }: { stackName: string }) {
|
||||
<HelpCircle className="h-4 w-4 text-muted-foreground cursor-help" strokeWidth={1.5} />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p className="max-w-[200px] text-sm">The system resource or metric to monitor. Select from CPU, Memory, Network I/O, or Restarts.</p>
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value max-w-[200px]">The system resource or metric to monitor. Select from CPU, Memory, Network I/O, or Restarts.</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
@@ -90,7 +90,7 @@ export function TopBar({
|
||||
) : (
|
||||
<Tooltip key={value}>
|
||||
<TooltipTrigger asChild>{button}</TooltipTrigger>
|
||||
<TooltipContent side="bottom">{label}</TooltipContent>
|
||||
<TooltipContent side="bottom"><span className="font-mono text-xs tabular-nums text-stat-value">{label}</span></TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -84,7 +84,7 @@ function PolicySyncRow({ state }: { state: PolicySyncState }) {
|
||||
{state.kind === 'paused' ? 'paused' : 'degraded'}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{tooltip}</TooltipContent>
|
||||
<TooltipContent><span className="font-mono text-xs tabular-nums text-stat-value">{tooltip}</span></TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
|
||||
@@ -122,7 +122,7 @@ function FleetNodeCard({ data, selected }: { data: FleetNodeData; selected?: boo
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">
|
||||
{node.cordonedReason || 'Cordoned: scheduling paused.'}
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">{node.cordonedReason || 'Cordoned: scheduling paused.'}</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
@@ -141,9 +141,11 @@ function FleetNodeCard({ data, selected }: { data: FleetNodeData; selected?: boo
|
||||
<Clock className="h-3 w-3 text-warning" strokeWidth={2} aria-label="Pilot heartbeat stale" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">
|
||||
{node.pilotLastSeen
|
||||
? `Pilot heartbeat ${formatRelative(node.pilotLastSeen)}`
|
||||
: 'Pilot heartbeat stale'}
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">
|
||||
{node.pilotLastSeen
|
||||
? `Pilot heartbeat ${formatRelative(node.pilotLastSeen)}`
|
||||
: 'Pilot heartbeat stale'}
|
||||
</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
@@ -179,7 +181,7 @@ function FleetNodeCard({ data, selected }: { data: FleetNodeData; selected?: boo
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">
|
||||
{labels.slice(MAX_INLINE_LABELS).join(', ')}
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">{labels.slice(MAX_INLINE_LABELS).join(', ')}</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
@@ -260,7 +262,7 @@ function TopologyToolbar({
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
{spec.description}
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">{spec.description}</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
|
||||
@@ -30,7 +30,7 @@ export function SidebarActions({ createStackSlot, onScan, isScanning, bulkMode,
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
<p>Bulk mode (B)</p>
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">Bulk mode (B)</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
@@ -50,7 +50,7 @@ export function SidebarActions({ createStackSlot, onScan, isScanning, bulkMode,
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
<p>Scan stacks folder</p>
|
||||
<span className="font-mono text-xs tabular-nums text-stat-value">Scan stacks folder</span>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('StackRow', () => {
|
||||
});
|
||||
|
||||
it('wraps the partial pill in a hover tooltip', () => {
|
||||
const { container } = render(<StackRow {...base({ status: 'partial', running: 3, total: 5 })} />);
|
||||
render(<StackRow {...base({ status: 'partial', running: 3, total: 5 })} />);
|
||||
const trigger = screen.getByText('PT');
|
||||
// Radix TooltipTrigger adds data-state to the wrapped element.
|
||||
expect(trigger.getAttribute('data-state')).toBe('closed');
|
||||
|
||||
Reference in New Issue
Block a user