enhancement
major
minor
defect
critical
major
minor
minor
#30044
TL Views: a sidebar separator stays visible when every item after it is hidden; the anonymous session sees the system separator with nothing below it
Problem
The engine's application shell (tl-layout-view, WEB-INF/views/app.view.xml) closes the application's sidebar items with <separator id="system-separator"/>. The only item following it is "Administration," which contains <access-control operation="Administration"/>. A session without that permission—specifically, an anonymous session—has the item hidden but still sees the separator as a line with nothing below it.
Observed in the TL Development app on snapshot build 59, which overlays the engine shell, in the anonymous session.
Expected
A sidebar separator is displayed only between two visible entries. A separator with no visible item before or after it, or directly adjacent to another displayed separator, is not shown. This rule is general and not specific to the system separator; therefore, the same applies to any application separator next to items hidden by access control.
Test
A sidebar containing items A, a separator, and B, where B is subject to an access control that the session lacks: the sidebar displays A and no separator.
Solution
The cause is structural: A <separator> describes a line, but what is intended is a division of the sidebar into sections. The line and the heading of a section are determined by which sections are currently displaying content.
- New sidebar element <section id="…"> with optional label (heading) and icon: groups entries into a section without expanding them; the entries appear as if they were at the section level. Like a group, a section can have an <access-control> and can be nested within groups and sections.
- A separator line appears between two adjacent displayed entries, at least one of which is a section—never at the beginning or end of a list. A section whose entries are all hidden or suppressed by access control is omitted entirely—including its heading and separator line—even if this changes at runtime. This corresponds to the groups in a menu (<menu>).
- In a group’s drop-down menu when the sidebar is collapsed, sections and nested groups appear under their heading between separator lines; previously, nested groups were completely missing there.
- <separator> and <header-item> are omitted: a heading now exists only as the label for a section; it disappears along with the section.
- The shell divides its sidebar into <section id="application"/> (empty; filled by the application) and <section id="system"> containing the administration section. In a session without administrative privileges, the system section—including the separator line—is omitted.
- The overlays for tl-demo-react, tl-ai-demo, tl-factory-app, the Archetype, and the developer articles view-layer/app-shell, view-layer/overlays, and view-layer/access-control have been updated.
Migration
An overlay of the shell (WEB-INF/views/app.view.xml of an application) that still references config:reference="system-separator" or uses <separator> or <header-item> can no longer be loaded (the application returns an HTTP 500 error at /view/ ). Fix:
- For entries that were placed before the system section using ` config:position="before"` and `config:reference="system-separator"`, remove these two attributes and place them in the application section:
{{{#!xml <sidebar config:ref="sidebar">
<items>
<section id="application">
<nav-item id="home">...</nav-item>
</section>
</items>
</sidebar> }}}
- A <separator/> between separate entries: enclose the entries before and after it in separate <section id="…"> elements.
- A <header-item id="x"> with a label: Replace it with a <section id="x"> with the same label and move the entries it overrode into that section. The IDs of the entries remain unchanged.