Skip to content
Snippets Groups Projects
Commit 73c8a76f authored by Maxime Jacquemin's avatar Maxime Jacquemin
Browse files

[ivette] Minor details

- Make a section disapear if it is empty.
- The filter button tooltip now displays the ratio of currently
  displayed functions over the toal number of functions
parent b25dc5da
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ export function Section(props: SectionProps): JSX.Element | null { ...@@ -134,7 +134,7 @@ export function Section(props: SectionProps): JSX.Element | null {
const icon = state ? 'TRIANGLE.DOWN' : 'TRIANGLE.RIGHT'; const icon = state ? 'TRIANGLE.DOWN' : 'TRIANGLE.RIGHT';
const { enabled = true, disabled = false, children } = props; const { enabled = true, disabled = false, children } = props;
if (disabled || !enabled) return null; if (disabled || !enabled || React.Children.count(children) === 0) return null;
const visible = unfold ?? state; const visible = unfold ?? state;
const maxHeight = visible ? 'max-content' : 0; const maxHeight = visible ? 'max-content' : 0;
......
...@@ -184,7 +184,7 @@ export default function Globals(): JSX.Element { ...@@ -184,7 +184,7 @@ export default function Globals(): JSX.Element {
const filterButtonProps = { const filterButtonProps = {
icon: 'TUNINGS', icon: 'TUNINGS',
title: 'Functions filtering options', title: `Functions filtering options (${nFilter} / ${nTotal})`,
onClick: onContextMenu, onClick: onContextMenu,
visible: !(onContextMenu === undefined), visible: !(onContextMenu === undefined),
className: 'dome-xSideBarSection-filterButton' className: 'dome-xSideBarSection-filterButton'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment