Change sidebar defaults and add new options for customizing visuals.
Review Request #10737 — Created Oct. 3, 2019 and submitted — Latest diff uploaded
Sidebar items no longer reserve space for icons or make the active/hover
indicator appear connected to the content by default. These visuals were
useful for the dashboard, and other pages, but aren't a good starting
point for sidebars.
New options have been added to enable these visuals:
-has-iconsmodifier, which enables the space reservation for icons
#rb-ns-ui.sidebars.set-display-style(@style)mixin can be
called with a value of
connected-rightto enable the visual of
connecting to content on the right. We'll be able to extend this down
the road to offer other visual styles, if needed. The page sidebar
currently turns this on. Future changes may change that default as
well, depending on needs.
Templates can add modifiers (or entire new CSS classes) to the main
sidebar-css-classestemplate block. The
datagrid template takes advantage of this to enable icon reservation.
There's also a fix for setting the width of a sidebar from within a
rule for a page CSS class. Previously, sidebar widths could only be
set at the top level of a stylesheet.
Verified that the main page sidebar for the dashboard looks as it did
before this change, but that other sidebars (in upcoming changes) didn't
have the space reservation or connected style by default.