#100535CSP module: On small browser size the UX of the details view could be improved
Description
When working with a small browser size, the details block is not scrollable – only the list of violations. So, some buttons on the details block are not reachable:
Addition: I have to scroll the list completely down, then also the details block will scroll. Not optimal from a user experience point of view, as I am losing the focus on the row I am just investigating (and have to search for the next row when scrolling up again).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[TASK] CSP module: On small browser size the UX of the details view could be improved Resolves: #100535 Releases: main
Related issues 2
Files 1
History 8
-
Chris Müller changed Related to #87423 <span data-processor="relativetime" data-value="2023-04-08T09:10:56+00:00" > 04/08/23, 09:10 </span>
-
Chris Müller changed Related to #99499 <span data-processor="relativetime" data-value="2023-04-08T09:11:11+00:00" > 04/08/23, 09:11 </span>
-
Chris Müller changed description <span data-processor="relativetime" data-value="2023-04-08T09:15:13+00:00" > 04/08/23, 09:15 </span>
-
Oliver Hader changed status
NewAccepted <span data-processor="relativetime" data-value="2023-04-08T09:15:51+00:00" > 04/08/23, 09:15 </span> -
Chris Müller changed tracker
BugTask subjectCSP module: On small browser size the details of a violation is not scrollableCSP module: On small browser size the UX of the details view could be improved <span data-processor="relativetime" data-value="2023-04-08T09:16:37+00:00" > 04/08/23, 09:16 </span> -
Benni Mack changed target version <span data-processor="relativetime" data-value="2023-06-05T09:23:05+00:00" > 06/05/23, 09:23 </span>
-
Christoph Erdmann commented and changed TYPO3 Version
1214 <span data-processor="relativetime" data-value="2026-11-16T08:42:36+00:00" > 11/16/26, 08:42 </span>Hello, this ticket is open for three years now, and two major versions were released without a fix. Some info here that may help, even as a patch in an upcoming patch release.
Cause
Build/Sources/Sass/element/typo3-backend-security-csp-reports.scss (branch main, identical in 14.3; 13.4 uses —module-docheader-height):
@container (min-width: 900px) { .infolist { display: grid; grid-template: "header header" "content info"; grid-template-columns: auto 400px; } ... .infolist-info-norecord, .infolist-info-record { position: sticky; top: calc(var(--module-docheader-sticky-height) + var(--typo3-spacing)); } }The details card (.infolist-info-record) is position: sticky, but has neither a max-height nor its own overflow. A sticky element that is taller than the scroll viewport keeps its top edge pinned, so its lower part only becomes visible when the sticky element reaches the end of its containing block, which is the end of the report table.
The
- elements of the details card (rendered in Build/Sources/TypeScript/backend/security/element/csp-reports.ts, renderSelectedReport()) have no word-break / overflow-wrap rule, so long URIs without break opportunities are wider than the 400px column. Since .card has “overflow: hidden”, the overflowing part is clipped and cannot
be read at all.Suggested solution
Show the details of a report in a modal (TYPO3 Modal API, @typo3/backend/modal.js) instead of the sticky side column:
- The modal body can scroll independently, the actions (Apply / Mute / Delete / Close) can be placed in the modal footer and are therefore always visible.
- The modal can be considerably wider than 400px, so long URIs (Blocked URI, Document URI, Source File) become readable. Combined with “overflow-wrap: anywhere” (or “word-break: break-all”) on the values, nothing is cut off any more.
- The report table could then use the full module width, which also helps the URI column.
- Keyboard handling that already exists (Escape closes the details, focus returns to the previously focused row) is provided by the modal as well.
Minimal alternative (if the side column layout should be kept):
typo3-backend-security-csp-reports .infolist-info-record { max-height: calc(100vh - var(--module-docheader-sticky-height) - 2 * var(--typo3-spacing)); overflow-y: auto; } // (--module-docheader-sticky-height exists in 14.x/main only; for a 13.4 backport use --module-docheader-height, as the existing "top" rule there does.) typo3-backend-security-csp-reports .infolist-info-record dd { overflow-wrap: anywhere; }and/or make the card footer sticky inside the card, so that Close / Mute / Delete are always visible.
- elements of the details card (rendered in Build/Sources/TypeScript/backend/security/element/csp-reports.ts, renderSelectedReport()) have no word-break / overflow-wrap rule, so long URIs without break opportunities are wider than the 400px column. Since .card has “overflow: hidden”, the overflowing part is clipped and cannot
ACK. However, I’m not an expert in CSS, design and UX topics. Any help is this topic is appreciated.