-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Component/s: Web UI
-
Release Notes Description:
-
Epic Link:
-
Tags:
-
Team:GANG
-
Sprint:nxGang Sprint 11.1.14, nxGang Sprint 11.1.15
-
Story Points:5
As described in NXS-5205, we need to think about a better way to provide common doc type layouts styles.
Original issue is that View Designer does not generate the proper css styles for metadata layouts. It adds:
<style> *[role=widget] { padding: 5px; } </style>
while it should have generated:
<style> *[role=widget] { margin-bottom: 16px; } label { @apply --nuxeo-label; } div.multiline { white-space: pre-line; } div { word-wrap: break-word; overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; -o-hyphens: auto; hyphens: auto; } </style>
I believe the metadata layouts needs these special CSS rules to behave well on the right-hand side of the browser.
The easy fix would be to make sure VD handles this specificity for metadata layouts (which we could maybe do for a 10.10TP fix?).
However, this is hardly maintainable as next time we'll change or add specific rules to a layout type, VD will also need adaptations.
Possible solutions/things to check:
- shouldn't we need the the metadata styles on all layouts?
- introduce some layouts common styles and add:
<style include="nuxeo-doc-layouts-styles">
to our html layouts. We could even introduce per layout type styles e.g. nuxeo-doc-metadata-layouts-styles
However, adding a layout style module will fragment styling between this module and nuxeo-styles. We will instead clean up nuxeo-styles, making the layout css rules more specific, and adding these to nuxeo-styles. See specs in TL-313. From now on, elements scaffolded on studio should now have include="nuxeo-styles" on their style block.