Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(options): fold the format choice and free the card's wide controls on mobile
Elian Doranf4aa1be3d50b
diff --git a/apps/client/src/widgets/dialogs/image_compression/image_compression_sections.tsx b/apps/client/src/widgets/dialogs/image_compression/image_compression_sections.tsxindex d4a5e50735..4647d76e4b 100644--- a/apps/client/src/widgets/dialogs/image_compression/image_compression_sections.tsx+++ b/apps/client/src/widgets/dialogs/image_compression/image_compression_sections.tsx@@ -270,6 +270,8 @@ function HandlingChoice<T extends string>({ title, help, description, values, cucurrentValue={disabled ? "" : currentValue}options={values.map((value) => ({ value, label: t(`space_usage.${labelKey}_${value}`) }))}onChange={(value) => !disabled && onChoose(value)}+ // Three named choices are wider than a phone: the PNG row's ran 74px past its card.+ collapseOnMobile/></>);diff --git a/apps/client/src/widgets/react/Card.css b/apps/client/src/widgets/react/Card.cssindex 963460facc..f88b987c7a 100644--- a/apps/client/src/widgets/react/Card.css+++ b/apps/client/src/widgets/react/Card.css@@ -86,6 +86,20 @@}}+/* On a phone, a control too wide to sit beside the text takes the line below it. A switch is narrow+ enough to stay put; a button labelled with a sentence is not, and left the description beside it+ reading a word to the line. */+body.mobile .tn-card-option:has(> .btn, > .slider) {+ flex-direction: column;+ align-items: stretch;++ /* A slider carries its own width (200px), which `stretch` cannot override — and having been+ given a line, it may as well use it. */+ > .slider {+ width: 100%;+ }+}+.tn-card-body {display: flex;flex-direction: column;