<commit_before>// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import '../analytics/analytics_stub.dart'
    if (dart.library.html) '../analytics/analytics.dart' as ga;
import '../auto_dispose_mixin.dart';
import '../charts/treemap.dart';
import '../common_widgets.dart';
import '../config_specific/drag_and_drop/drag_and_drop.dart';
import '../notifications.dart';
import '../octicons.dart';
import '../screen.dart';
import '../split.dart';
import '../theme.dart';
import 'code_size_attribution.dart';
import 'code_size_controller.dart';
import 'code_size_table.dart';
import 'file_import_container.dart';

bool codeSizeScreenEnabled = true;

const initialFractionForTreemap = 0.67;
const initialFractionForTreeTable = 0.33;

class CodeSizeScreen extends Screen {
  const CodeSizeScreen()
      : super.conditional(
          id: id,
          requiresDartVm: true,
          title: 'Code Size',
          icon: Octicons.fileZip,
        );

  static const snapshotTabKey = Key('Snapshot Tab');
  static const diffTabKey = Key('Diff Tab');
  static const id = 'codeSize';

  @visibleForTesting
  static const clearButtonKey = Key('Clear Button');
  @visibleForTesting
  static const dropdownKey = Key('Diff Tree Type Dropdown');

  @visibleForTesting<commit_msg>Change code size page id to match docs entry point (#2330)<commit_after>// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import '../analytics/analytics_stub.dart'
    if (dart.library.html) '../analytics/analytics.dart' as ga;
import '../auto_dispose_mixin.dart';
import '../charts/treemap.dart';
import '../common_widgets.dart';
import '../config_specific/drag_and_drop/drag_and_drop.dart';
import '../notifications.dart';
import '../octicons.dart';
import '../screen.dart';
import '../split.dart';
import '../theme.dart';
import 'code_size_attribution.dart';
import 'code_size_controller.dart';
import 'code_size_table.dart';
import 'file_import_container.dart';

bool codeSizeScreenEnabled = true;

const initialFractionForTreemap = 0.67;
const initialFractionForTreeTable = 0.33;

class CodeSizeScreen extends Screen {
  const CodeSizeScreen()
      : super.conditional(
          id: id,
          requiresDartVm: true,
          title: 'Code Size',
          icon: Octicons.fileZip,
        );

  static const snapshotTabKey = Key('Snapshot Tab');
  static const diffTabKey = Key('Diff Tab');
  static const id = 'code-size';

  @visibleForTesting
  static const clearButtonKey = Key('Clear Button');
  @visibleForTesting
  static const dropdownKey = Key('Diff Tree Type Dropdown');

  @visibleForTesting
{'fraction_non_alphanumeric': 0.12516823687752354, 'fraction_numerical': 0.008075370121130552, 'mean_word_length': 4.0561224489795915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '416013', 'n_tokens_mistral': 939, 'n_tokens_neox': 897, 'n_words': 247}