From 72e8ba2951e6b98f9d84157d6387bf133b70a1ff Mon Sep 17 00:00:00 2001 From: Ludy Date: Mon, 20 Jul 2026 14:01:40 +0200 Subject: [PATCH] fix(admin-settings): prevent hydration error in the Admin General section (#6823) # Description of Changes - What was changed - Fixed an invalid HTML nesting issue in `AdminGeneralSection` by changing the affected Mantine `Text` wrapper from the default `

` element to `component="div"`. - This prevents a `

` from being rendered inside a `

` when the `Group` for the "Logo Style" label is displayed. - Why the change was made - Firefox reported a hydration error in the settings modal because the rendered DOM was invalid. - The warning was triggered in the Admin General settings section and affected the settings modal experience. Firefox 152.0.3 (64-Bit) ``` In HTML,

cannot be a descendant of

. This will cause a hydration error. ...

<@mantine/core/Stack gap="lg" className="settings-s..."> <@mantine/core/Box ref={null} className="settings-s..." style={{...}} variant={undefined}>
<@mantine/core/Paper withBorder={true} p="md" radius="md"> <@mantine/core/Box ref={null} mod={[...]} className="m_1b7284a3..." style={{...}} variant={undefined} ...>
<@mantine/core/Stack gap="md"> <@mantine/core/Box ref={null} className="m_6d731127..." style={{...}} variant={undefined}>
<@mantine/core/Text>
<@mantine/core/Text size="sm" fw={500} mb={4}> <@mantine/core/Box className="mantine-fo..." style={{...}} ref={null} component="p" ...> >

ref={null} > style={{--text-fz:"var(--mant...",--text-lh:"var(--mant...",marginBottom:"calc(0.25r...", ...}} > className="mantine-focus-auto m_b6d8b162 mantine-Text-root" > data-variant={undefined} > data-size="sm" > size={undefined} > > <@mantine/core/Group gap="xs"> <@mantine/core/Box className="m_4081bf90..." style={{...}} ref={null} ...> >

ref={null} > style={{--group-gap:"var(--mant...",--group-align:"center",--group-justify:"flex-start", ...}} > className="m_4081bf90 mantine-Group-root" > data-variant={undefined} > data-size={undefined} > size={undefined} > > ... ... ... ... react-dom-client.development.js:2605:19 ``` --- ## 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/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 run `task check` to verify linters, typechecks, and tests pass - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details. --- .../shared/config/configSections/AdminGeneralSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx index 5e78d21a22..8a902a0604 100644 --- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx +++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx @@ -482,7 +482,7 @@ export default function AdminGeneralSection() {
- + {t("admin.settings.general.logoStyle.label", "Logo Style")}