<commit_before>$(document).ready(function(){
    var section_shown = 0;
    var form_sections = ["#general", "#section-a", "#section-b", "#additional-comments"];
    var animation_running = false;

    for(var i = 0; i < form_sections.length; i++){
        $(form_sections[i]).hide()
    }
    $(form_sections[section_shown]).show();

    $("#prev-arrow").mousedown(function(){
        if(section_shown > 0 && !animation_running){
            animation_running = true;
            $(form_sections[section_shown]).hide("slide", { direction: "right" }, 300);
            $(form_sections[section_shown - 1]).show("slide", { direction: "left" }, 300, function(){
                animation_running = false;
            });
            section_shown -= 1;
            if(section_shown == 1){
                $(".content").css("min-height", "1750px");
            } else {
                $(".content").css("min-height", "0px");
            }
        }
    })
    $("#next-arrow").mousedown(function(){
        if(section_shown < form_sections.length - 1 && !animation_running){
            animation_running = true;
            $(form_sections[section_shown]).hide("slide", { direction: "left" }, 300);
            $(form_sections[section_shown + 1]).show("slide", { direction: "right" }, 300, function(){
                animation_running = false;
            });
            section_shown += 1
            if(form_sections[section_shown] == "#section-a"){
                $(".content").css("min-height", "1750px");
                $(".content").css("margin-bottom", "15px");                
            } else {
                $(".content").css("min-height", "0px");
                $(".content").css("margin-bottom", "0px");                
            }
        }
    });

    $(".question-information-row").hide();

    $('input[name=question-1]').click(function() {
        if($('input[name=question-1]:checked').val() == "yes"){
            $(".question-1-information-row").show();
        } else {
            $(".question-1-information-row").hide();            
        }
    });

    $('input[name=question-2]').click(function() {
        if($('input[name=question-2]:checked').val() == "yes"){
            $(".question-2-information-row").show();
        } else {
            $(".question-2-information-row").hide();            
        }
    });

    $('input[name=question-3]').click(function() {
        if($('input[name=question-3]:checked').val() == "yes"){
            $(".question-3-information-row").show();
        } else {
            $(".question-3-information-row").hide();            
        }
    });

    $('input[name=question-4]').click(function() {
        if($('input[name=question-4]:checked').val() == "yes"){
            $(".question-4-information-row").show();
        } else {
            $(".question-4-information-row").hide();            
        }
    });

    $('input[name=question-5]').click(function() {
        if($('input[name=question-5]:checked').val() == "yes"){
            $(".question-5-information-row").show();
        } else {
            $(".question-5-information-row").hide();            
        }
    });

    $('input[name=question-6]').click(function() {
        if($('input[name=question-6]:checked').val() == "yes"){
            $(".question-6-information-row").show();
        } else {
            $(".question-6-information-row").hide();            
        }
    });

    $('input[name=question-7]').click(function() {
        if($('input[name=question-7]:checked').val() == "yes"){
            $(".question-7-information-row").show();
        } else {
            $(".question-7-information-row").hide();            
        }
    });



});<commit_msg>changed section-a to be responsive to how much space is actually needed<commit_after>$(document).ready(function(){
    var sectionShown = 0;
    var formSections = ["#general", "#section-a", "#section-b", "#additional-comments"];
    var animationRunning = false;

    for(var i = 0; i < formSections.length; i++){
        $(formSections[i]).hide()
    }
    $(formSections[sectionShown]).show();

    $("#prev-arrow").mousedown(function(){
        if(sectionShown > 0 && !animationRunning){
            animationRunning = true;
            $(formSections[sectionShown]).hide("slide", { direction: "right" }, 300);
            $(formSections[sectionShown - 1]).show("slide", { direction: "left" }, 300, function(){
                animationRunning = false;
                sectionShown -= 1;
                if(formSections[sectionShown] == "#section-a"){
                    $(".content").css("min-height", min_height.toString() + "px");
                    $(".content").css("margin-bottom", "5px");                
                } else {
                    $(".content").css("min-height", "0px");
                    $(".content").css("margin-bottom", "0px");                
                }
            });
        }
    })

    $("#next-arrow").mousedown(function(){
        if(sectionShown < formSections.length - 1 && !animationRunning){
            animationRunning = true;
            $(formSections[sectionShown]).hide("slide", { direction: "left" }, 300);
            $(formSections[sectionShown + 1]).show("slide", { direction: "right" }, 300, function(){
                animationRunning = false;
                sectionShown += 1
                if(formSections[sectionShown] == "#section-a"){
                    $(".content").css("min-height", min_height.toString() + "px");
                    $(".content").css("margin-bottom", "5px");                
                } else {
                    $(".content").css("min-height", "0px");
                    $(".content").css("margin-bottom", "0px");                
                }
            });
        }
    });

    $(".question-information-row").hide();

    var APPROXIMATE_ROW_HEIGHT = 50;
    var min_height = 600;

    $('input[name=question-1]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-1]:checked').val() == "yes"){
            $(".question-1-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 3;
        } else {
            $(".question-1-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 3;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-2]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-2]:checked').val() == "yes"){
            $(".question-2-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 4;
        } else {
            $(".question-2-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 4;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-3]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-3]:checked').val() == "yes"){
            $(".question-3-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 1;
        } else {
            $(".question-3-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 1;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-4]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-4]:checked').val() == "yes"){
            $(".question-4-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 7;
        } else {
            $(".question-4-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 7;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-5]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-5]:checked').val() == "yes"){
            $(".question-5-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 3;
        } else {
            $(".question-5-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 3;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-6]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-6]:checked').val() == "yes"){
            $(".question-6-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 3;
        } else {
            $(".question-6-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 3;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });

    $('input[name=question-7]').change(function() {
        if(!this.checked){
            return;
        }
        if($('input[name=question-7]:checked').val() == "yes"){
            $(".question-7-information-row").show();
            min_height += APPROXIMATE_ROW_HEIGHT * 6;
        } else {
            $(".question-7-information-row").hide();            
            min_height -= APPROXIMATE_ROW_HEIGHT * 6;
        }
        $(".content").css("min-height", min_height.toString() + "px");
        $(".content").css("margin-bottom", "5px");                
    });
});
{'fraction_non_alphanumeric': 0.20304159532682042, 'fraction_numerical': 0.01430154094067882, 'mean_word_length': 1.837953701057445, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3288832', 'n_tokens_mistral': 2974, 'n_tokens_neox': 2826, 'n_words': 360}