<commit_before>import React from "react";

import { truncate } from "lodash";
import { Col } from "antd";

import PlayButton from "../PlayButton";

class MovieThumbInfo extends React.Component {
    constructor(props) {
        super(props);
    }

    _handleClick(movie) {
        this.props.onClickMovie(movie);
    }

    render() {
        const { directories, movie, onClickMovie } = this.props;
        const fullPath = directories.Movies + "/" + movie.file_info.subpath;
        const movieTitle = {
            __html: truncate(movie.title, { length: 30 })
        };
        return (
            <div>
                <a
                    href="javascript:void(0)"
                    onClick={this._handleClick.bind(this, movie)}
                >
                    <img
                        className="ib-movies-thumbnail"
                        src={"/images/movies/" + movie.image_filename}
                    />
                </a>
                <PlayButton
                    filename={movie.file_info.filename}
                    fullPath={fullPath}
                />
                <a
                    href="javascript:void(0)"
                    onClick={this._handleClick.bind(this, movie)}
                >
                    <span dangerouslySetInnerHTML={movieTitle} />
                </a>
            </div>
        );
    }
}

export default MovieThumbInfo;<commit_msg>Added event handlers for showing the play button veil when mouseover.<commit_after>import React from "react";

import { truncate } from "lodash";
import { Col } from "antd";

import PlayButton from "../PlayButton";

class MovieThumbInfo extends React.Component {
    constructor(props) {
        super(props);

        this.state = {
            isMouseOverMovie: false,
            isMouseOverVeil: false
        };
    }

    _handleClick(movie) {
        this.props.onClickMovie(movie);
    }

    _handleMouseOverMovie() {
        this.setState({
            isMouseOverMovie: true
        });
    }

    _handleMouseOutMovie() {
        this.setState({
            isMouseOverMovie: false
        });
    }

    render() {
        const { directories, movie, onClickMovie } = this.props;
        const fullPath = directories.Movies + "/" + movie.file_info.subpath;
        const movieTitle = {
            __html: truncate(movie.title, { length: 30 })
        };

        let playButton = null;
        if (this.state.isMouseOverMovie) {
            playButton = (
                <div className="ib-movies-veil">
                    <PlayButton
                        filename={movie.file_info.filename}
                        fullPath={fullPath}
                    />
                </div>
            );
        }
        return (
            <div
                onMouseEnter={this._handleMouseOverMovie.bind(this)}
                onMouseLeave={this._handleMouseOutMovie.bind(this)}
            >
                <a
                    href="javascript:void(0)"
                    onClick={this._handleClick.bind(this, movie)}
                >
                    <img
                        className="ib-movies-thumbnail"
                        src={"/images/movies/" + movie.image_filename}
                    />
                </a>
                {playButton}
                <a
                    href="javascript:void(0)"
                    onClick={this._handleClick.bind(this, movie)}
                >
                    <span dangerouslySetInnerHTML={movieTitle} />
                </a>
            </div>
        );
    }
}

export default MovieThumbInfo;
{'fraction_non_alphanumeric': 0.1056279456612143, 'fraction_numerical': 0.0022179096201829776, 'mean_word_length': 1.3113388853299168, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '6532432', 'n_tokens_mistral': 987, 'n_tokens_neox': 903, 'n_words': 164}