diff --git a/components/reports/identifier-settings.tsx b/components/reports/identifier-settings.tsx index 1a886896b..fd1aea14b 100644 --- a/components/reports/identifier-settings.tsx +++ b/components/reports/identifier-settings.tsx @@ -24,13 +24,20 @@ import { SERVICES, SERVICE_IDS, clampChoose, optionalOf, printable, settingsProb import { PRICE_MAX } from "@/lib/reports/report"; import { cn } from "@/lib/utils"; +/** + * On a phone at large text a service's controls are wider than its row: there they shrink and wrap, the choices onto + * a second line, rather than widening the page. Where they fit, nothing changes. + */ +const CONTROLS = "flex shrink-0 items-center gap-3 max-sm:min-w-0 max-sm:shrink max-sm:flex-wrap"; +const WRAPS = "max-sm:max-w-full max-sm:flex-wrap max-sm:rounded-[1.375rem]"; + /** What can't be changed here, drawn as the app draws a locked control: a lock, faded, with why on hover. */ function Locked({ why, children }: { why: string; children: React.ReactNode }) { return ( - + - + {children} @@ -136,16 +143,16 @@ export function IdentifierSettings({ identifiers: ids, connected }: { identifier {ready ? hint(id) : t("notConnected")} {why ? ( - + - undefined} options={modes} /> + undefined} options={modes} className={WRAPS} /> {/* Only its mode is locked: Zenodo with Crossref still adds what its price says. */} {tied ? service(id, { price })} /> : null} ) : ( - - void service(id, { mode })} options={modes} /> + + void service(id, { mode })} options={modes} className={WRAPS} /> service(id, { price })} /> @@ -163,6 +170,7 @@ export function IdentifierSettings({ identifiers: ids, connected }: { identifier {t("pickHint", { services: optional.map((id) => SERVICES[id].name).join(" + ") })} {