<commit_before>const connect = require('react-redux').connect;
const PropTypes = require('prop-types');
const React = require('react');
const FormattedMessage = require('react-intl').FormattedMessage;

const HelpForm = props => {
    const prefix = 'https://mitscratch.freshdesk.com/widgets/feedback_widget/new?&widgetType=embedded&widgetView=yes&screenshot=No&searchArea=No';
    const title = `formTitle=${props.title}`;
    const username = `helpdesk_ticket[custom_field][cf_scratch_name_40167]=${props.user.username || ''}`;
    const formSubject = `helpdesk_ticket[subject]=${props.subject}`;
    const reportLink = `helpdesk_ticket[custom_field][cf_inappropriate_report_link_40167]=${props.body || ''}`;
    return (
        <div>
            <script
                async
                defer
                src="https://s3.amazonaws.com/assets.freshdesk.com/widget/freshwidget.js"
                type="text/javascript"
            />
            <style
                media="screen, projection"
                type="text/css"
            >
                @import url(https://s3.amazonaws.com/assets.freshdesk.com/widget/freshwidget.css);
            </style>
            <iframe
                className="freshwidget-embedded-form"
                frameBorder="0"
                height="594px"
                id="freshwidget-embedded-form"
                scrolling="no"
                src={`${prefix}&${title}&${username}&${formSubject}&${reportLink}`}
                title={<FormattedMessage id="contactUs.questionsForum" />}
                width="100%"
            />
        </div>
    );
};


HelpForm.propTypes = {
    body: PropTypes.string,
    subject: PropTypes.string,
    title: PropTypes.string.isRequired,
    user: PropTypes.shape({
        classroomId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
        thumbnailUrl: PropTypes.string,
        username: PropTypes.string
    })<commit_msg>Adjust form height to avoid form scrolling<commit_after>const connect = require('react-redux').connect;
const PropTypes = require('prop-types');
const React = require('react');
const FormattedMessage = require('react-intl').FormattedMessage;

const HelpForm = props => {
    const prefix = 'https://mitscratch.freshdesk.com/widgets/feedback_widget/new?&widgetType=embedded&widgetView=yes&screenshot=No&searchArea=No';
    const title = `formTitle=${props.title}`;
    const username = `helpdesk_ticket[custom_field][cf_scratch_name_40167]=${props.user.username || ''}`;
    const formSubject = `helpdesk_ticket[subject]=${props.subject}`;
    const reportLink = `helpdesk_ticket[custom_field][cf_inappropriate_report_link_40167]=${props.body || ''}`;
    return (
        <div>
            <script
                async
                defer
                src="https://s3.amazonaws.com/assets.freshdesk.com/widget/freshwidget.js"
                type="text/javascript"
            />
            <style
                media="screen, projection"
                type="text/css"
            >
                @import url(https://s3.amazonaws.com/assets.freshdesk.com/widget/freshwidget.css);
            </style>
            <iframe
                className="freshwidget-embedded-form"
                frameBorder="0"
                height="644px"
                id="freshwidget-embedded-form"
                scrolling="no"
                src={`${prefix}&${title}&${username}&${formSubject}&${reportLink}`}
                title={<FormattedMessage id="contactUs.questionsForum" />}
                width="100%"
            />
        </div>
    );
};


HelpForm.propTypes = {
    body: PropTypes.string,
    subject: PropTypes.string,
    title: PropTypes.string.isRequired,
    user: PropTypes.shape({
        classroomId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
        thumbnailUrl: PropTypes.string,
        username: PropTypes.string
    })
{'fraction_non_alphanumeric': 0.13551521350038354, 'fraction_numerical': 0.009716185118895423, 'mean_word_length': 2.4046997389033944, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 6, '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': '3730202', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1096, 'n_words': 148}