<commit_before>import * as React from "react";
import {HBox, VBox} from "../react-ui/FlexBox";
import ReactUtils from "../utils/ReactUtils";

export interface HelpIconProps extends React.HTMLProps<HelpIcon>
{
}

export interface HelpIconState
{
	
}

export default class HelpIcon extends React.Component<HelpIconProps, HelpIconState>
{
	constructor(props:HelpIconProps)
	{
		super(props);
	}
	
	popup:React.ReactInstance;
	
	removePopup()
	{
		if (this.popup)
			ReactUtils.closePopup(this.popup);
		this.popup = null;
	}

	componentWillUnmount()
	{
		this.removePopup();
	}
	
	render()
	{
		var props:HelpIconProps = {};
		for (var key in this.props)
			if (key != "children" && key != "ref" && key != "key")
				(props as any)[key] = (this.props as any)[key]

		return (
			<i
				{...props as any}
				className={"weave-help-icon fa fa-question-circle fa-fw" + (" " + this.props.className || "")}
				onMouseEnter={(event) => {
					this.popup = ReactUtils.openPopup(
						this,
						<HBox
							style={{
								position: "absolute",
								left: event.clientX + 10,
								top: event.clientY + 10,
								width: 400
							}}
							className="weave-help-tooltip"
							children={this.props.children}
						/>
					);
				}} 
				onMouseLeave={() => this.removePopup()}
			/>
		)
	}
}<commit_msg>setting HelpIcon maxWidth instead of width<commit_after>import * as React from "react";
import {HBox, VBox} from "../react-ui/FlexBox";
import ReactUtils from "../utils/ReactUtils";

export interface HelpIconProps extends React.HTMLProps<HelpIcon>
{
}

export interface HelpIconState
{
	
}

export default class HelpIcon extends React.Component<HelpIconProps, HelpIconState>
{
	constructor(props:HelpIconProps)
	{
		super(props);
	}
	
	popup:React.ReactInstance;
	
	removePopup()
	{
		if (this.popup)
			ReactUtils.closePopup(this.popup);
		this.popup = null;
	}

	componentWillUnmount()
	{
		this.removePopup();
	}
	
	render()
	{
		var props:HelpIconProps = {};
		for (var key in this.props)
			if (key != "children" && key != "ref" && key != "key")
				(props as any)[key] = (this.props as any)[key]

		return (
			<i
				{...props as any}
				className={"weave-help-icon fa fa-question-circle fa-fw" + (" " + this.props.className || "")}
				onMouseEnter={(event) => {
					this.popup = ReactUtils.openPopup(
						this,
						<HBox
							style={{
								position: "absolute",
								left: event.clientX + 10,
								top: event.clientY + 10,
								maxWidth: 400
							}}
							className="weave-help-tooltip"
							children={this.props.children}
						/>
					);
				}} 
				onMouseLeave={() => this.removePopup()}
			/>
		)
	}
}
{'fraction_non_alphanumeric': 0.15181268882175228, 'fraction_numerical': 0.005287009063444109, 'mean_word_length': 2.861516034985423, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '3367876', 'n_tokens_mistral': 1127, 'n_tokens_neox': 897, 'n_words': 187}