code: function _togglePanels() {
          var togglePanelCount;
          panelsToggled = !panelsToggled;
          if (panelsToggled) {
              _hidePanelsIfRequired();
              layoutUpdated = false;
              panelsToggled = true;
          } else if (!layoutUpdated) {
              _showPanelsIfRequired();
          }
  
          //log health data
          togglePanelCount = HealthLogger.getHealthDataLog(HEALTH_TOGGLE_PANELS);
          togglePanelCount = (typeof togglePanelCount === 'number') ? togglePanelCount + 1 : 0;
          HealthLogger.setHealthDataLog(HEALTH_TOGGLE_PANELS, togglePanelCount);
      }
docs: We toggle panels in certain cases only :
  1. if a panel is shown, toggle can hide it, and successive toggle can show the panel and repeat.
  2. if a panel is hidden by toggle, and say the workspace changed making another panel visible by some operation;
  we reset toggle states so that toggle would hide the panel already present in the workspace.
  The already hidden panel should not be shown in the specific case for better UX.