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

import { SpeedDial, SpeedDialItem } from 'react-mui-speeddial';

import Add from 'material-ui/svg-icons/content/add';
import Close from 'material-ui/svg-icons/navigation/close';
import Done from 'material-ui/svg-icons/action/done';
import LightbulbOutline from 'material-ui/svg-icons/action/lightbulb-outline';

import {
  green600,
  yellow800,
} from 'material-ui/styles/colors';

class FAB extends Component {
  render() {
    const styles = {
      speedDial: {
        position: 'absolute',
        right: '20px',
        bottom: '20px',
        zIndex: 1000,
      },
      newTask: {
        color: green600,
      },
      newIdea: {
        color: yellow800,
      },
    };
    return (
      <SpeedDial
        className="SpeedDial"
        fabContentOpen={<Add />}
        fabContentClose={<Close />}
        style={styles.speedDial}
      >
        <SpeedDialItem
          fabContent={<Done />}
        />
        <SpeedDialItem
          fabContent={<LightbulbOutline />}
        />
      </SpeedDial>
    );
  }
}

export default FAB;
<commit_msg>Update FAB to add new task to redux state<commit_after>import React, { Component } from 'react';

import { SpeedDial, SpeedDialItem } from 'react-mui-speeddial';

import Add from 'material-ui/svg-icons/content/add';
import Close from 'material-ui/svg-icons/navigation/close';
import Done from 'material-ui/svg-icons/action/done';
import LightbulbOutline from 'material-ui/svg-icons/action/lightbulb-outline';

import NewTaskDialog from './NewTaskDialog';

import {
  green600,
  yellow800,
} from 'material-ui/styles/colors';

class FAB extends Component {
  constructor() {
    super();
    this.state = {
      taskDialogOpen: false,
    };
  }
  handleRequestClose = () => {
    this.setState({
      taskDialogOpen: false,
    });
  }
  handleRequestTaskDialogOpen = () => {
    this.setState({
      taskDialogOpen: true,
    });
  }
  handleRequestTaskAdd = (taskInfo) => {
    this.props.addTask({
      task: taskInfo.task,
      period: taskInfo.period * taskInfo.periodValue,
      start: taskInfo.start * taskInfo.startValue,
      estimation: taskInfo.estimation * taskInfo.estimationValue,
      repetition: taskInfo.repetition * taskInfo.repetitionValue,
    });
    this.handleRequestClose();
  }
  render() {
    const styles = {
      speedDial: {
        position: 'absolute',
        right: '20px',
        bottom: '20px',
        zIndex: 1000,
      },
      newTask: {
        color: green600,
      },
      newIdea: {
        color: yellow800,
      },
    };
    return (
      <SpeedDial
        className="SpeedDial"
        fabContentOpen={<Add />}
        fabContentClose={<Close />}
        style={styles.speedDial}
      >
        <SpeedDialItem
          fabContent={<Done />}
          onTouchTap={this.handleRequestTaskDialogOpen}
        />
        <SpeedDialItem
          fabContent={<LightbulbOutline />}
        />
        <NewTaskDialog
          open={this.state.taskDialogOpen}
          onRequestClose={this.handleRequestClose}
          onRequestAdd={this.handleRequestTaskAdd}
        />
      </SpeedDial>
    );
  }
}

export default FAB;

{'fraction_non_alphanumeric': 0.12538989394884592, 'fraction_numerical': 0.012476606363069246, 'mean_word_length': 2.382911392405063, 'pattern_counts': {'":': 0, '<': 20, '<?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': '1200783', 'n_tokens_mistral': 1032, 'n_tokens_neox': 998, 'n_words': 182}