Fix giant Select-All checkbox (class collision) + disable UI text selection

- Select-All checkbox rendered huge when not-all-selected because its empty-state
  modifier class 'empty' collided with the .empty full-panel placeholder rule
  (flex:1; padding:30px). Renamed the modifier to 'off'.
- Disable text selection on UI chrome (native-app feel); keep it enabled for
  inputs, the code editor/viewer, terminal output, log, blame/diff, AI summary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bonchellon
2026-07-08 11:01:55 +03:00
parent 29303cbf43
commit b40358e0f5
2 changed files with 9 additions and 3 deletions

View File

@ -31,8 +31,15 @@ html,body,#root{height:100%}
body{
font-family:var(--font);color:var(--txt);background:var(--bg);
-webkit-font-smoothing:antialiased;letter-spacing:.1px;overflow:hidden;
/* native-app feel: UI chrome text isn't selectable (this is not a web page) */
-webkit-user-select:none;user-select:none;cursor:default;
}
button{font-family:var(--font)}
/* …but keep selection where copying/editing text is genuinely useful */
input,textarea,[contenteditable="true"],
.code,.code-body,.code-edit,.termout,.termbody,.blame-body,.diff-body,.diff,.logbody,.explain-body{
-webkit-user-select:text;user-select:text;cursor:auto;
}
/* height divided by the zoom factor: CSS `zoom` shrinks the box but `vh` still
measures the unzoomed viewport, so without this a gap grows below at zoom<1 */
@ -172,7 +179,7 @@ body.resizing{cursor:col-resize!important;user-select:none}
background:linear-gradient(145deg,var(--accent-2),var(--accent-deep));display:grid;place-items:center;flex:0 0 auto;box-shadow:0 0 8px rgba(124,110,246,.4)}
.chk svg{width:10px;height:10px;color:#fff}
.chk{cursor:pointer}
.chk.empty{background:transparent;border-color:var(--border);box-shadow:none}
.chk.off{background:transparent;border-color:var(--border);box-shadow:none}
.crumb{display:flex;align-items:center;gap:4px;font-family:var(--mono);font-size:12px;flex-wrap:wrap}
.crumb .seg{color:var(--accent-2);cursor:pointer}.crumb .seg:hover{text-decoration:underline}
.crumb .sep{color:var(--faint)}

View File

@ -1181,8 +1181,7 @@ function Workbench({ info, session, light, toggleTheme, lang, setLang, zoom, set
</div>
)}
<div className="chhead">
<span className={"chk" + (allChecked ? "" : " empty")} onClick={toggleAll} title={allChecked ? t("Deselect all") : t("Select all")}
style={{ width: 16, height: 16, minWidth: 16, flex: "0 0 16px", boxSizing: "border-box", alignSelf: "center" }}>{allChecked ? I.check : null}</span>
<span className={"chk" + (allChecked ? "" : " off")} onClick={toggleAll} title={allChecked ? t("Deselect all") : t("Select all")}>{allChecked ? I.check : null}</span>
<span>{t("{a} of {b} selected", { a: checked.size, b: view.length })}</span>
<button className={"scanbtn" + ((busy || scanning) ? " spinning" : "")} style={{ marginLeft: "auto" }} onClick={() => refresh()} disabled={busy || scanning} title={t("Re-read open files (p4 opened)")}>
{I.sync}<span>{scanning ? t("Scanning…") : t("Refresh")}</span>