Review main Abandoned

87988[BUGFIX] Allow display of white-space in site settings descriptions

Garvin Hicking CR 0 V 0 Easy +7 −1 updated 02/06/25, 11:18

Commit message

When the YAML definition of settings.definitions.yaml
contain special characters like line-breaks or tabs,
these were not rendered in the GUI.

With this patch, the CSS directive "white-space: pre-wrap"
is set for ".settings-item-description" and ".settings-category p",
so that a YAML definition like this:

```
categories:
  someCategory:
    label: 'A category'
    description: "Some text.\nWith newline.\n\t\tTabbed."
settings:
  some.item:
    type: string
    category: someCategory
    default: ''
    label: "Some category"
    description: "Some text.\nWith newline.\n\t\tTabbed."

```

can take effect and is shown with white-spaces intact
for better formatting.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 1316

  1. Garvin Hicking uploaded patch set 1 02/03/25, 08:16

  2. core-ci voted on patch set 1 V +1 02/03/25, 08:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73363

  3. Garvin Hicking commented on patch set 1 V -1 02/05/25, 19:24

    categories descriptions need this too
  4. Garvin Hicking uploaded patch set 2 V +1 02/06/25, 07:15

  5. core-ci voted on patch set 2 V +1 02/06/25, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73626

  6. Oliver Hader voted on patch set 2 CR +1 02/06/25, 08:02

  7. Oliver Hader voted on patch set 2 V +1 02/06/25, 08:07

  8. Oli Bartsch updated the commit message in patch set 3 CR +1 V +1 02/06/25, 08:26

  9. Oli Bartsch voted on patch set 3 CR +1 V +1 02/06/25, 08:26

  10. core-ci voted on patch set 3 V +1 02/06/25, 08:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73628

  11. Garvin Hicking commented on patch set 3 CR -1 02/06/25, 09:01

    @benjamin.kott@outlook.com and @ben@bnf.dev will discuss this, blocking for the moment
  12. Benjamin Kott commented on patch set 3 CR -2 02/06/25, 09:22

    We do not want CSS hacks here, to support this. This will not help us in the long run, the preferred way is to integrate Markdown support to also allow more structure.
  13. Benjamin Franzke commented on patch set 3 02/06/25, 09:30

    Reply

    +1 for markdown from my site, planned to do the same for our system settings migration in: > https://review.typo3.org/c/Packages/TYPO3.CMS/+/83623 We currently have embedded HTML in the internal DefaultConfigurationDescription.yaml file. This is suboptimal for output in CLI context and always requires sanitization. Therefore I'd like to avoid supporting any "subset" like only newlines or tabs (tabs are bad ;))
  14. Oliver Hader commented on patch set 3 02/06/25, 09:36

    Reply

    Markdown still would require sanitization... Anyway, personally I'd be fine to use markdown. However, we might consider adding that support the TYPO3 v13 as well - not only to TYPO3 v14 as a new feature...
  15. Garvin Hicking abandoned the change 02/06/25, 09:37

    See comment for reasoning, I understand+agree.
  16. Benjamin Franzke commented on patch set 3 02/06/25, 11:18

    Reply

    ack, agree to sanitization and also to v13 support! Implemented in: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050