feat(web): settings helptext behind a "?" popup instead of inline paragraphs

The Qobuz/Monitor/Discovery help I just added was always-visible and verbose.
Replace each with a compact "?" button (new reusable HelpButton) that opens the
same content in a popup (reuses the Modal), keeping the settings tabs clean.

web tsc + build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-14 12:21:17 +02:00
parent 24d4ba6098
commit 1a612f1808
3 changed files with 72 additions and 31 deletions
+25
View File
@@ -0,0 +1,25 @@
"use client";
import { useState, type ReactNode } from "react";
import { Modal } from "./modal";
/** A small "?" affordance that opens its help content in a popup, keeping settings pages
* uncluttered. */
export function HelpButton({ title, children }: { title: string; children: ReactNode }) {
const [open, setOpen] = useState(false);
return (
<>
<button
type="button"
className="help-btn"
aria-label={`Help: ${title}`}
onClick={() => setOpen(true)}
>
?
</button>
<Modal open={open} onClose={() => setOpen(false)} title={title}>
<div className="help-body">{children}</div>
</Modal>
</>
);
}