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(image-compression): give the compress images dialog a fixed 640px width
Elian Doran6f6e2e8020c0
diff --git a/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.css b/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.cssindex 0ad24e8817..c049d34680 100644--- a/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.css+++ b/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.css@@ -1,10 +1,5 @@.modal.image-compression-dialog {- /* Sized by its content rather than to the floor the component sets: no row title wraps, so a- long one has to widen the dialog. Capped at the viewport, past which there is nowhere to grow. */- .modal-dialog {- width: fit-content;- max-width: 100%;- }+ --bs-modal-width: 640px;/* Two cards, held apart so the split between how the run compresses and how far it reachesreads as deliberate rather than as one list with a gap in it. */diff --git a/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.tsx b/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.tsxindex a873d9596a..6149e5f402 100644--- a/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.tsx+++ b/apps/client/src/widgets/dialogs/image_compression/image_compression_dialog.tsx@@ -146,8 +146,7 @@ function ImageCompressionDialog({ target, onFinished }: {<ModalclassName="image-compression-dialog"title={action}- size="sm"- minWidth={COMPRESSION_DIALOG_MIN_WIDTH}+ size="md"show={shown}onHidden={() => void runPendingCompression()}footer={<>@@ -198,13 +197,6 @@ function ImageCompressionDialog({ target, onFinished }: {);}-/**- * The width the dialog starts at, narrow on purpose: a few settings read top to bottom rather than- * scanned across. A floor rather than a size — row titles never wrap, so a long translation widens- * the dialog instead of folding onto a second line (see the sections' stylesheet).- */-const COMPRESSION_DIALOG_MIN_WIDTH = "420px";-/*** Longer than the default couple of seconds: this reports on something that ran unattended and has* three figures worth reading, and it is the only account of a run the user will get.