<commit_before>import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { WelcomeStep } from './welcome'
import { LinkButton } from '../lib/link-button'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { Form } from '../lib/form'
import { Button } from '../lib/button'
import { Row } from '../lib/row'
import { Octicon, OcticonSymbol } from '../octicons'

const SamplesURL = 'https://desktop.github.com/samples/'

interface IUsageOptOutProps {
  readonly dispatcher: Dispatcher
  readonly advance: (step: WelcomeStep) => void
  readonly done: () => void
  readonly optOut: boolean
}

/** The Welcome flow step for opting out of stats reporting. */
export class UsageOptOut extends React.Component<IUsageOptOutProps, void> {
  public render() {
    return (
      <Form className='usage-opt-out' onSubmit={this.finish}>
        <div className='header'>
          <Octicon className='header-icon' symbol={OcticonSymbol.graph}/>
          <Octicon className='header-icon' symbol={OcticonSymbol.pulse}/>
          <Octicon className='header-icon' symbol={OcticonSymbol.radioTower}/>
        </div>

        <div>
          Would you like to help us improve GitHub Desktop by periodically submitting <LinkButton uri={SamplesURL}>anonymous usage data</LinkButton>?
        </div>

        <Checkbox
          label='Yes, submit anonymized usage data'
          value={this.props.optOut ? CheckboxValue.Off : CheckboxValue.On}
          onChange={this.onChange}
        />

        <Row>
          <Button type='submit'>Finish</Button>
          <Button onClick={this.cancel}>Cancel</Button>
        </Row>
      </Form>
    )
  }

  private onChange = (event: React.FormEvent<HTMLInputElement>) => {
    const value = event.currentTarget.checked
    this.props.dispatcher.setStatsOptOut(!value)
  }

  private cancel = () => {
    this.props.advance(WelcomeStep.ConfigureGit)
  }<commit_msg>Add a title and fix spacing for opt-out screen<commit_after>import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { WelcomeStep } from './welcome'
import { LinkButton } from '../lib/link-button'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { Form } from '../lib/form'
import { Button } from '../lib/button'
import { Row } from '../lib/row'
import { Octicon, OcticonSymbol } from '../octicons'

const SamplesURL = 'https://desktop.github.com/samples/'

interface IUsageOptOutProps {
  readonly dispatcher: Dispatcher
  readonly advance: (step: WelcomeStep) => void
  readonly done: () => void
  readonly optOut: boolean
}

/** The Welcome flow step for opting out of stats reporting. */
export class UsageOptOut extends React.Component<IUsageOptOutProps, void> {
  public render() {
    return (
      <Form className='usage-opt-out' onSubmit={this.finish}>
        <div className='header'>
          <Octicon className='header-icon' symbol={OcticonSymbol.graph}/>
          <Octicon className='header-icon' symbol={OcticonSymbol.pulse}/>
          <Octicon className='header-icon' symbol={OcticonSymbol.radioTower}/>
        </div>

        <h1 className='welcome-title'>Help improve GitHub Desktop!</h1>

        <p>
          Would you like to help us improve GitHub Desktop by periodically submitting <LinkButton uri={SamplesURL}>anonymous usage data</LinkButton>?
        </p>

        <Checkbox
          label='Yes, submit anonymized usage data'
          value={this.props.optOut ? CheckboxValue.Off : CheckboxValue.On}
          onChange={this.onChange}
        />

        <Row className='actions'>
          <Button type='submit'>Finish</Button>
          <Button onClick={this.cancel}>Cancel</Button>
        </Row>
      </Form>
    )
  }

  private onChange = (event: React.FormEvent<HTMLInputElement>) => {
    const value = event.currentTarget.checked
    this.props.dispatcher.setStatsOptOut(!value)
  }

  private cancel = () => {
    this.props.advance(WelcomeStep.ConfigureGit)
  }
{'fraction_non_alphanumeric': 0.13296537882589063, 'fraction_numerical': 0.0005017561465127947, 'mean_word_length': 3.106076210092688, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 53, 'https://': 2, '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': '1063936', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1117, 'n_words': 290}