kleigh's avatar
kleigh
Icon for Responsive Resident rankResponsive Resident
1 day ago
Status:
New

Theme JSON: Allow leaf and root nodes in slicer to be styled separately.

When creating a list slicer where only the leaf nodes are selectable, it is useful to style the root and leaf nodes separately.

Currently, this does not seem possible to achieve in the JSON. While it is possible to prepare many parts of a leaf-only slicer with a style preset*, it is not possible to target the different levels separately. This means that each time a slicer of this type is created, even with a preset there is manual work required to set the style for the header sections.

A method similar to targeting interaction states could be added. Alongside (for example) selection:selected and interaction:hover there could be level:root and level:leaf. For slicers with multiple levels, level:branch could also be included. 

While the slicer UI itself targets field names rather than generic levels, it is better that the presets can target generic levels rather than relying on specific fields. It is more likely that the generic levels provide a reusable preset in the theme. The slicer and UI would handle mapping in the background.

This feature would provide a time save in creating new slicers with no need to manually customise each instance - and would avoid inconsistencies from this process.

* As an aside, currently the UI does not allow a slicer to be created which forces exactly one leaf node to be selected. The only way to get the correct combination of options is to use a JSON preset.

No CommentsBe the first to comment

Recent ideas