<commit_before>import React, {
    Component,
    PropTypes
} from 'react';

import {
    Board,
    Thread,
    Header,
    Settings
} from '~/containers'

import { onContentViewToggle } from '~/events/subscribers';

import {
    bindMembersToClass
} from '~/utils/react';

const {
    headerHeight
} = window.appSettings


class ContentView extends Component {

    constructor(props) {
        super(props);

        // inView: props.settings.activeView == "content"
        this.state = {
            inView:       true,
            hideDuration: 600,
            showDuration: 600,
            hideEasing:   [0.23, 1, 0.32, 1],
            showEasing:   [0.23, 1, 0.32, 1]
        }

        bindMembersToClass(this, 'toggleViewState');
    }

    @onContentViewToggle
    onToggle() {
        console.log('ContentView.onToggle(). inView:', this.state.inView)
        this.state.inView ? this.hide() : this.show();
    }

    hide() {
        this.animate({
            translateY: window.innerHeight,
            translateZ: 0
        }, {
            duration: this.state.hideDuration,
            easing:   this.state.hideEasing,
            complete: this.toggleViewState
        });
    }

    show() {
        this.animate({
            translateY: 0,
            translateZ: 0
        }, {
            duration: this.state.showDuration,
            easing:   this.state.showEasing,
            complete: this.toggleViewState
        });
    }

    toggleViewState() {
        this.setState({
            inView: !this.state.inView
        })
    }

    render() {
        const {
            id,
            ...restProps
        } = this.props;

        return (
            <section
              {...restProps}
              ref={ref => this._view = ref}
              className='View ContentView'>
              <Header />
              <Board />
              <Thread />
              <Settings />
            </section>
        )
    }

    animate(styles, options) {
        this._view && $(this._view).velocity(styles, options);
    }
}

ContentView.displayName = 'ContentView';

ContentView.propTypes = {<commit_msg>feat(Header): Use DynamicHeader in ContentView<commit_after>import React, {
    Component,
    PropTypes
} from 'react';

import {
    Board,
    Thread,
    Header,
    Settings
} from '~/containers'

import { onContentViewToggle } from '~/events/subscribers';

import {
    bindMembersToClass
} from '~/utils/react';

const {
    headerHeight
} = window.appSettings


class ContentView extends Component {

    constructor(props) {
        super(props);

        // inView: props.settings.activeView == "content"
        this.state = {
            inView:       true,
            hideDuration: 600,
            showDuration: 600,
            hideEasing:   [0.23, 1, 0.32, 1],
            showEasing:   [0.23, 1, 0.32, 1]
        }

        bindMembersToClass(this, 'toggleViewState');
    }

    @onContentViewToggle
    onToggle() {
        console.log('ContentView.onToggle(). inView:', this.state.inView)
        this.state.inView ? this.hide() : this.show();
    }

    hide() {
        this.animate({
            translateY: window.innerHeight,
            translateZ: 0
        }, {
            duration: this.state.hideDuration,
            easing:   this.state.hideEasing,
            complete: this.toggleViewState
        });
    }

    show() {
        this.animate({
            translateY: 0,
            translateZ: 0
        }, {
            duration: this.state.showDuration,
            easing:   this.state.showEasing,
            complete: this.toggleViewState
        });
    }

    toggleViewState() {
        this.setState({
            inView: !this.state.inView
        })
    }

    render() {
        const {
            id,
            ...restProps
        } = this.props;

        return (
            <section
              {...restProps}
              ref={ref => this._view = ref}
              className='View ContentView'>
              <Header.containers.DynamicHeader />
              {/*<Header.containers.SubHeader />*/}
              <Board />
              <Thread />
              <Settings />
            </section>
        )
    }

    animate(styles, options) {
        this._view && $(this._view).velocity(styles, options);
    }
}

ContentView.displayName = 'ContentView';

ContentView.propTypes = {
{'fraction_non_alphanumeric': 0.12094933820173437, 'fraction_numerical': 0.011410314924691922, 'mean_word_length': 1.5393974507531865, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 18, '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': '4124296', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1236, 'n_words': 233}