Merge pull request #250 from jhd3197/feat/ux-focus-labels-2

fix(ui): finish focus rings and InfoTip names
This commit is contained in:
Juan Denis authored and GitHub committed 2026-11-11 00:42:12 -05:00
commit 0732930975
23 files changed
+51 -14

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ const RequiresDocker = ({ children, what = 'This page' }) => {
<p className="requires-docker__footnote">
{t('app.requiresDocker.checkedAutomatically', 'Re-checked automatically.')}{' '}
<Link to="/settings/system">{t('app.requiresDocker.settingsSystem', 'Settings → System')}</Link>
{' '}<InfoTip>
{' '}<InfoTip subject={t('app.requiresDocker.checkedAutomatically', 'Re-checked automatically.')}>
{t('app.requiresDocker.serverkitReChecksForDockerAutomatically', 'ServerKit re-checks for Docker automatically. Monitoring, domains, certificates, cron and DNS keep working without it. See')}{' '}
{t('app.requiresDocker.settingsSystem', 'Settings → System')} {t('app.requiresDocker.forThisInstallSProfile', 'for this install\'s profile.')}
</InfoTip>
@@ -20,6 +20,12 @@ test('InfoTip subject beats title beats nearby text; label overrides all; plain
assert.equal(infoTipName({ title: { type: 'span' }, nearby: ' ' }, t), 'More info');
});
test('theme gallery cards name the tip after the theme, not its description', () => {
assert.equal(infoTipName({ subject: 'Apamate', nearby: 'Warm dark palette' }, t), 'More info about Apamate');
const gallery = readFileSync(new URL('../settings/ThemeGallery.jsx', import.meta.url), 'utf8');
assert.match(gallery, /<InfoTip subject=\{themeEntry\.name \|\| themeEntry\.slug\}>/);
});
test('nearbyText reads the label printed before the button, trimmed', () => {
const el = { previousSibling: { textContent: ' ', previousSibling: { textContent: ' Cert expiry ' } } };
assert.equal(nearbyText(el), 'Cert expiry');
@@ -203,7 +203,7 @@ const ProxyStackPanel = ({ serverId }) => {
<div className="proxy-panel__hint tip-chip-row">
<ProxyLogoTiles />
<InfoTip>{t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')}</InfoTip>
<InfoTip subject={t('app.proxyStackPanel.reverseProxy', 'Reverse proxy')}>{t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')}</InfoTip>
</div>
{audit && audit.mismatch_count > 0 && (
@@ -208,14 +208,14 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
<Puzzle aria-hidden="true" />
{t('app.overviewTab.marketplaceLink', 'Extensions')}
</Link>
<InfoTip>{t('app.overviewTab.moreSecurityTools', 'More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the Extensions marketplace.')}</InfoTip>
<InfoTip subject={t('app.overviewTab.marketplaceLink', 'Extensions')}>{t('app.overviewTab.moreSecurityTools', 'More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the Extensions marketplace.')}</InfoTip>
</>
)}
<Link to="/settings/notifications" className="tip-chip tip-chip--accent">
<Bell aria-hidden="true" />
{t('app.overviewTab.notificationsLink', 'Notifications')}
</Link>
<InfoTip>{t('app.overviewTab.addAlertDeliveryChannelsDiscordSlack', 'Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.')}</InfoTip>
<InfoTip subject={t('app.overviewTab.notificationsLink', 'Notifications')}>{t('app.overviewTab.addAlertDeliveryChannelsDiscordSlack', 'Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.')}</InfoTip>
</div>
</SharedCardContent>
</SharedCard>
@@ -107,7 +107,7 @@ export default function AIManagementSettings({ connections, defaultId }) {
<Button type="button" variant="outline" onClick={previewRoute} disabled={busy || !sample.trim()}>{t('ai.management.preview', 'Preview routing')}</Button>
{preview && <div className="sk-ai-routing-result" role="status"><strong>{connections.find((item) => item.id === preview.connection_id)?.name} · {preview.model}</strong><p>{preview.reason}</p></div>}
{toggle('fallback_enabled', t('ai.management.enableFallback', 'Enable fallback before output starts'))}
<InfoTip>{t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')}</InfoTip>
<InfoTip subject={t('ai.management.enableFallback', 'Enable fallback before output starts')}>{t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')}</InfoTip>
{candidates('fallbacks')}
</section>
<section className="settings-card">
@@ -67,7 +67,7 @@ const ProfileTab = () => {
<Pill dot={false}>
<RoleIcon aria-hidden="true" />
<span className="profile-identity__role">{role}</span>
<InfoTip>{t('app.profileTab.contactAnAdministratorToChangeYour', 'Contact an administrator to change your role')}</InfoTip>
<InfoTip subject={t('app.usersTab.role', 'Role')}>{t('app.profileTab.contactAnAdministratorToChangeYour', 'Contact an administrator to change your role')}</InfoTip>
</Pill>
{user?.created_at && (
<Pill dot={false} title={t('app.profileTab.memberSince', 'Member since')}>
@@ -510,7 +510,7 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
</Pill>
</span>
)}
<InfoTip>{t('app.siteSettingsTab.sitesPublishAt', 'Services publish at')} <code>&lt;name&gt;.{b.domain || 'base-domain'}</code>.{' '}
<InfoTip subject={b.domain}>{t('app.siteSettingsTab.sitesPublishAt', 'Services publish at')} <code>&lt;name&gt;.{b.domain || 'base-domain'}</code>.{' '}
{(b.dns_mode || 'wildcard') === 'wildcard'
? <>{t('app.siteSettingsTab.point', 'Point')} <code>*.{b.domain || 'base-domain'}</code> {t('app.siteSettingsTab.atThisServer', 'at this server.')}</>
: <>{t('app.siteSettingsTab.eachNewSiteGetsItsOwn', 'Each new service gets its own A record, auto-created via the provider.')}</>}</InfoTip>
@@ -91,7 +91,7 @@ const ThemeGallery = () => {
{themeEntry.description && (
// keydown must not reach the card's select-on-Enter handler
<span onKeyDown={(e) => e.stopPropagation()}>
<InfoTip>{themeEntry.description}</InfoTip>
<InfoTip subject={themeEntry.name || themeEntry.slug}>{themeEntry.description}</InfoTip>
</span>
)}
</div>
+1 -1
View File
@@ -434,7 +434,7 @@ const Services = () => {
}
emptyIcon={Layers}
emptyTitle={t('app.services.noServicesYet', 'No services yet')}
emptyDescription={<>{t('app.services.emptyShort', 'Connect a repo or install a template.')} <InfoTip>{t('app.services.emptyFull', 'Connect a Git repository, upload files, or install a ready-made template to deploy your first service.')}</InfoTip></>}
emptyDescription={<>{t('app.services.emptyShort', 'Connect a repo or install a template.')} <InfoTip subject={t('app.services.noServicesYet', 'No services yet')}>{t('app.services.emptyFull', 'Connect a Git repository, upload files, or install a ready-made template to deploy your first service.')}</InfoTip></>}
emptyAction={
<Button asChild>
<Link to="/services/new">
+1
View File
@@ -106,6 +106,7 @@
&:focus {
border-color: $accent-primary;
outline: none;
box-shadow: $focus-ring;
}
&::placeholder {
@@ -771,7 +771,7 @@ $calendar-cell: 32px;
&:focus-visible {
outline: none;
box-shadow: 0 0 0 4px $accent-bg; // geometry: focus halo around the thumb
box-shadow: 0 0 0 2px $bg-card, 0 0 0 4px $accent-primary; // geometry: gapped ring; the old 10% halo vanished on both themes
}
}
@@ -421,6 +421,9 @@
font-size: $text-sm;
overflow: hidden;
// inset: the cell clips an outer ring
:is(a, button, [role='button'], [tabindex]):focus-visible { outline-offset: -2px; }
&.is-num {
text-align: right;
font-size: $text-xs;
@@ -1007,7 +1010,7 @@
font-size: $text-sm;
outline: none;
&:focus { border-color: var(--accent-dim); }
&:focus { border-color: var(--accent-dim); box-shadow: $focus-ring; }
}
&__del {
@@ -136,6 +136,7 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
transition: 0.14s;
&:hover { color: var(--text-dim); }
&:focus-visible { outline-offset: -2px; } // inset: the pill row clips an outer ring
&.is-on { background: var(--surface-3); color: var(--text); box-shadow: none; }
.sk-seg__count { font-size: $text-xs; opacity: 0.7; }
@@ -708,6 +709,9 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
background: var(--surface);
border: 1px solid var(--border-soft);
border-radius: $radius-card;
// inset: the wrap (and stacked phone cards) clips an outer ring
:is(a, button, [role='button'], [tabindex]):focus-visible { outline-offset: -2px; }
}
// A table that is one section of a titled card/panel runs flush inside it:
@@ -1074,7 +1078,7 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
transition: border-color 0.14s;
&::placeholder { color: var(--text-faint); }
&:focus { border-color: var(--accent-dim); }
&:focus { border-color: var(--accent-dim); box-shadow: $focus-ring; }
}
}
}
@@ -1826,6 +1830,9 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
border-radius: $radius-card;
background: var(--surface);
overflow: hidden;
// inset: the list clips an outer ring
:is(a, button, [role='button'], [tabindex]):focus-visible { outline-offset: -2px; }
}
.sk-resource-card {
@@ -294,6 +294,7 @@ display: flex;
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
&:disabled,
+1 -1
View File
@@ -95,7 +95,7 @@
&:focus-visible {
outline: 2px solid $accent-primary;
outline-offset: 2px;
outline-offset: -2px; // inset: the scrolling strip clips an outer ring
border-radius: $radius-badge;
}
}
+4
View File
@@ -602,6 +602,8 @@
color: $text-primary;
}
&:focus-visible { box-shadow: inset 0 0 0 2px $accent-primary; } // geometry: inset, the menu clips an outer ring
&[data-disabled] {
opacity: 0.5;
pointer-events: none;
@@ -703,6 +705,8 @@
color: $text-primary;
}
&:focus-visible { box-shadow: inset 0 0 0 2px $accent-primary; } // geometry: inset, the menu clips an outer ring
&[data-disabled] {
opacity: 0.5;
pointer-events: none;
@@ -249,6 +249,7 @@
&:focus {
outline: none;
border-color: var(--accent-primary);
box-shadow: $focus-ring;
}
}
@@ -1252,6 +1253,7 @@
&:focus {
outline: none;
border-color: var(--primary-color, #6366f1);
box-shadow: $focus-ring;
}
&:disabled {
+1
View File
@@ -112,6 +112,7 @@
&:focus {
outline: none;
border-color: $border-active;
box-shadow: $focus-ring;
}
}
@@ -861,6 +861,7 @@ $ft-default: #646b7a;
&:focus {
border-color: var(--accent-dim);
box-shadow: $focus-ring;
}
}
}
@@ -175,6 +175,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}
+1
View File
@@ -541,6 +541,7 @@
&:focus {
outline: none;
border-color: var(--accent-dim);
box-shadow: $focus-ring;
}
}
+3
View File
@@ -93,6 +93,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}
}
@@ -883,6 +884,7 @@
&:focus {
border-color: $accent-primary;
outline: none;
box-shadow: $focus-ring;
}
}
}
@@ -1316,6 +1318,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}
}
+7 -1
View File
@@ -148,7 +148,7 @@
&:focus-visible {
outline: none;
box-shadow: $focus-ring;
box-shadow: inset 0 0 0 2px var(--accent-primary); // geometry: inset, the nav scroller clips an outer ring
}
&.active {
@@ -1232,6 +1232,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
&:disabled {
@@ -1461,6 +1462,8 @@
border-color: var(--border-strong);
}
&:focus-visible { outline-offset: -2px; } // inset: the gallery clips an outer ring
&--active {
border-color: var(--accent-primary);
box-shadow: inset 0 0 0 1px var(--accent-primary); // geometry: doubles the selected border
@@ -1984,6 +1987,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}
}
@@ -2152,6 +2156,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}
}
@@ -2228,6 +2233,7 @@
&:focus {
outline: none;
border-color: $accent-primary;
box-shadow: $focus-ring;
}
}