diff --git a/src/renderer/self-check/chrome.ts b/src/renderer/self-check/chrome.ts index 1f26ae1..1bb4e25 100644 --- a/src/renderer/self-check/chrome.ts +++ b/src/renderer/self-check/chrome.ts @@ -62,6 +62,23 @@ export async function checkAppBarMenu(report: Report): Promise { left >= 78 ? `ok (${left.toFixed(1)}px)` : `FAIL (first control at ${left.toFixed(1)}px)` } + /* + * The update chip takes no room while there is nothing to say. Measured, not + * queried: the hidden attribute lost once to the chip's own display rule and + * left an empty pill on the bar. The updater never starts under the + * self-check, so the chip is always in its idle state here. + */ + const chip = bar.querySelector('.update-chip') + if (chip === null) { + report['updateChipIdleTakesNoRoom'] = 'FAIL (no chip element on the bar)' + } else { + const box = chip.getBoundingClientRect() + report['updateChipIdleTakesNoRoom'] = + box.width === 0 && box.height === 0 + ? 'ok' + : `FAIL (idle chip is ${box.width.toFixed(1)}x${box.height.toFixed(1)}px)` + } + bar.querySelector('.app-bar__btn')?.click() await waitFor(() => openMenu() !== null) const menu = document.querySelector('.command-menu') diff --git a/src/renderer/styles/app.css b/src/renderer/styles/app.css index 7a693e6..0a9240b 100644 --- a/src/renderer/styles/app.css +++ b/src/renderer/styles/app.css @@ -1507,6 +1507,11 @@ button.keys__chord:hover { -webkit-app-region: no-drag; } +/* display: flex above would beat the hidden attribute's display: none. */ +.update-chip[hidden] { + display: none; +} + .update-chip:hover { border-color: var(--border-active); color: var(--fg);