From 3ae2946d57a15872ebce550419fdba28882b104e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20Sz=C3=BCcs?=
<127139797+balazs-szucs@users.noreply.github.com>
Date: Thu, 13 Nov 2025 12:59:11 +0100
Subject: [PATCH] [V2] refactor(ui): migrate compress/booklet/sign-up to
Mantine Checkbox (#4886)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
# Description of Changes
- Updated `BookletImpositionSettings` to use Mantine's `Checkbox` for
better UI consistency
- Replaced manual checkbox implementations with Mantine's `Checkbox` in
`CompressSettings`
- Added labels and tooltips for enhanced accessibility and usability
### Before:
### After:
---
## Checklist
### General
- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings
### Documentation
- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
### Translations (if applicable)
- [ ] I ran
[`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md)
### UI Changes (if applicable)
- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
### Testing (if applicable)
- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
---------
Signed-off-by: Balázs Szücs
---
.../BookletImpositionSettings.tsx | 147 +++++++++---------
.../tools/compress/CompressSettings.tsx | 20 +--
.../proprietary/routes/signup/SignupForm.tsx | 20 +--
3 files changed, 90 insertions(+), 97 deletions(-)
diff --git a/frontend/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx b/frontend/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx
index f0c76f04c..d9c668229 100644
--- a/frontend/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx
+++ b/frontend/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { useTranslation } from "react-i18next";
-import { Stack, Text, Divider, Collapse, Button, NumberInput } from "@mantine/core";
+import { Stack, Text, Divider, Collapse, Button, NumberInput, Checkbox } from "@mantine/core";
import { BookletImpositionParameters } from "@app/hooks/tools/bookletImposition/useBookletImpositionParameters";
import ButtonSelector from "@app/components/shared/ButtonSelector";
@@ -21,28 +21,27 @@ const BookletImpositionSettings = ({ parameters, onParameterChange, disabled = f
{/* Double Sided */}
-
+ {
+ const isDoubleSided = event.currentTarget.checked;
+ onParameterChange('doubleSided', isDoubleSided);
+ // Reset to BOTH when turning double-sided back on
+ if (isDoubleSided) {
+ onParameterChange('duplexPass', 'BOTH');
+ } else {
+ // Default to FIRST pass when going to manual duplex
+ onParameterChange('duplexPass', 'FIRST');
+ }
+ }}
+ disabled={disabled}
+ label={
+
+ {t('bookletImposition.doubleSided.label', 'Double-sided printing')}
+ {t('bookletImposition.doubleSided.tooltip', 'Creates both front and back sides for proper booklet printing')}
+
+ }
+ />
{/* Manual Duplex Pass Selection - only show when double-sided is OFF */}
{!parameters.doubleSided && (
@@ -90,47 +89,44 @@ const BookletImpositionSettings = ({ parameters, onParameterChange, disabled = f
{/* Right-to-Left Binding */}
-
+ onParameterChange('spineLocation', event.currentTarget.checked ? 'RIGHT' : 'LEFT')}
+ disabled={disabled}
+ label={
+
+ {t('bookletImposition.rtlBinding.label', 'Right-to-left binding')}
+ {t('bookletImposition.rtlBinding.tooltip', 'For Arabic, Hebrew, or other right-to-left languages')}
+
+ {t('bookletImposition.addBorder.label', 'Add borders around pages')}
+ {t('bookletImposition.addBorder.tooltip', 'Adds borders around each page section to help with cutting and alignment')}
+