Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/renderer/self-check/chrome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ export async function checkAppBarMenu(report: Report): Promise<void> {
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<HTMLElement>('.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<HTMLButtonElement>('.app-bar__btn')?.click()
await waitFor(() => openMenu() !== null)
const menu = document.querySelector<HTMLElement>('.command-menu')
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading