<commit_before>import React from 'react';
import { UIView } from '@uirouter/react';

import { ReactInjector } from 'core/reactShims';
import { FilterCollapse } from 'core/filterModel/FilterCollapse';
import { Application } from 'core/application';

export interface IInsightLayoutProps {
  app: Application;
}

export const InsightLayout = ({ app }: IInsightLayoutProps) => {
  const [appIsReady, setAppIsReady] = React.useState(false);
  const [expandFilters, setExpandFilters] = React.useState(ReactInjector.insightFilterStateModel.filtersExpanded);
  const { filtersHidden } = ReactInjector.insightFilterStateModel;
  const filterClass = expandFilters ? 'filters-expanded' : 'filters-collapsed';

  const toggleFilters = (): void => {
    ReactInjector.insightFilterStateModel.pinFilters(!expandFilters);
    setExpandFilters(!expandFilters);
  };

  React.useEffect(() => {
    app.ready().then(() => setAppIsReady(true));
  }, []);

  if (app.notFound || app.hasError) {
    return null;
  }

  return (
    <div className={`insight ${filterClass}`}>
      {!filtersHidden && (
        <div onClick={toggleFilters}>
          <FilterCollapse />
        </div>
      )}
      {!filtersHidden && (
        <div>
          <UIView name="nav" className="nav ng-scope" />
        </div>
      )}
      {appIsReady && (
        <div>
          <UIView name="master" className="nav-content ng-scope" data-scroll-id="nav-content" />
        </div>
      )}
      {appIsReady && (
        <div>
          <UIView name="detail" className="detail-content" />
        </div>
      )}
    </div>
  );
};<commit_msg>fix(core): Remove conditional for master UI View (#8316)<commit_after>import React from 'react';
import { UIView } from '@uirouter/react';

import { ReactInjector } from 'core/reactShims';
import { FilterCollapse } from 'core/filterModel/FilterCollapse';
import { Application } from 'core/application';

export interface IInsightLayoutProps {
  app: Application;
}

export const InsightLayout = ({ app }: IInsightLayoutProps) => {
  const [appIsReady, setAppIsReady] = React.useState(false);
  const [expandFilters, setExpandFilters] = React.useState(ReactInjector.insightFilterStateModel.filtersExpanded);
  const { filtersHidden } = ReactInjector.insightFilterStateModel;
  const filterClass = expandFilters ? 'filters-expanded' : 'filters-collapsed';

  const toggleFilters = (): void => {
    ReactInjector.insightFilterStateModel.pinFilters(!expandFilters);
    setExpandFilters(!expandFilters);
  };

  React.useEffect(() => {
    app.ready().then(() => setAppIsReady(true));
  }, []);

  if (app.notFound || app.hasError) {
    return null;
  }

  return (
    <div className={`insight ${filterClass}`}>
      {!filtersHidden && (
        <div onClick={toggleFilters}>
          <FilterCollapse />
        </div>
      )}
      {!filtersHidden && (
        <div>
          <UIView name="nav" className="nav ng-scope" />
        </div>
      )}
      <div>
        <UIView name="master" className="nav-content ng-scope" data-scroll-id="nav-content" />
      </div>
      {appIsReady && (
        <div>
          <UIView name="detail" className="detail-content" />
        </div>
      )}
    </div>
  );
};
{'fraction_non_alphanumeric': 0.148493320907114, 'fraction_numerical': 0.0012426219322771047, 'mean_word_length': 3.225721784776903, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4115729', 'n_tokens_mistral': 990, 'n_tokens_neox': 999, 'n_words': 186}