Bug #105974
closedline breaks in settings.definitions.yaml are ignored
100%
Description
It's not possible to add a linebreak according to https://yaml-multiline.info/ and|or https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/CodingGuidelines/CglYaml.html
in my site set settings.definitions.yaml. In other yaml-contexts like form-framework \n is respected.
Files
Updated by Garvin Hicking 20 days ago
- Category set to Site Handling, Site Sets & Routing
Updated by Gerrit Code Review 19 days ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87851
Updated by Oliver Hader 19 days ago
- File 105974-demo.png 105974-demo.png added
In general, the YAML parser supports line breaks, e.g. when wrapped in quotes - e.g. @key: "first\nsecond\nthird".
For site set definitions, those line breaks are however not reflected in the user interface.
I've added a short proof-of-concept change on review.typo3.org for the corresponding web component, now using a new nl2br
function to convert newlines to <br>
.
This might probably be a new generic nl2br
lit directive instead.
Updated by Gerrit Code Review 19 days ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87851
Updated by Gerrit Code Review 19 days ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87851
Updated by Oliver Hader 18 days ago
- Status changed from Under Review to Needs Feedback
The PoC at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87851 showed that there is no YAML parsing issue, but more a representation issue in the browser (since newlines are not automatically represented in HTML).
@Garvin Hicking Mentioned, it could be fixed easily with CSS white-space: pre
@wini2 no-lastname-given Can you please describe where you wanted to use line-breaks in the site sets, or what you're scenario was about? Thanks in advance!
Updated by wini2 no-lastname-given 18 days ago
- File site-sets01.jpg site-sets01.jpg added
If a longer description/explanation is needed, line breaks could make it much easier to read. 105974-demo.png is the result I expect.
Updated by Gerrit Code Review 8 days ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87988
Updated by Garvin Hicking 8 days ago
- Status changed from Under Review to Needs Feedback
I've now pushed patch the following patch that sets 'white-space: pre'. Please check if that would help you:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/87988
[BUGFIX] Allow display of white-space in site settings descriptions
Updated by Garvin Hicking 8 days ago
- Status changed from Needs Feedback to Under Review
Updated by wini2 no-lastname-given 5 days ago
Thanks for your response.
I've tested linebreaks in settings.definitions.yaml
ubsp.templateRootPath:
label: 'Templates'
category: ubsp.templates
type: string
default: 'EXT:ubsp/Resources/Private/ContentElements/Templates/'
description: "Setting für eigenes SP. Weitere s. settings.yaml Some text.\nWith newline.\n\t\tTabbed."
works fine. But for categories it doesn't work.
categories: ubsp: label: 'ub sitepackage' description: "Some text.\nWith newline.\n\t\tTabbed." ...
Updated by Garvin Hicking 5 days ago
Thanks! Yes indeed, this needs to be set for each field where linebreaks could occur. Any chance you know of other fields like this?
Updated by wini2 no-lastname-given 5 days ago
With a slightly additon in the typo3/sysext/backend/Resources/Public/Css/backend.css it should work.
.settings-category p {color: purple; white-space:pre;}
Updated by wini2 no-lastname-given 5 days ago
I don't know if white-space: pre is responsible that I get a horizontal scrollbar. Maybe
white-space: pre-wrap
would be a better choice.
Updated by Garvin Hicking 5 days ago
Very helpful, thanks, I will ammend the patch accordingly
Updated by Gerrit Code Review 5 days ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87988
Updated by Garvin Hicking 5 days ago
I've updated the patch and commit message, happy if you could check it (and maybe vote on the patch)
Updated by Gerrit Code Review 5 days ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87988
Updated by Benjamin Kott 5 days ago
Please avoid solutions to this that include CSS od manual parsing.
If we want to extend the capabilities here, we should add Markdown support here with a reasonable subset.
Please see https://quire.getty.edu/docs-v1/fundamentals/ for examples of Markdown in YAML.
Updated by Gerrit Code Review 5 days ago
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 4 days ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 4 days ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 4 days ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 3 days ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 3 days ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 3 days ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review 1 day ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88050
Updated by Gerrit Code Review about 12 hours ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88133
Updated by Benjamin Franzke about 12 hours ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2a4e461635b3a90df50f6e19b661af9124ee5605.