<commit_before>//
//  ProgressView.swift
//  DashKitUI
//
//  Created by <NAME> on 3/2/20.
//  Copyright © 2020 LoopKit Authors. All rights reserved.
//

import SwiftUI

public struct ProgressView: View {
    
    private let progress: CGFloat
    
    private let barHeight: CGFloat = 8
    
    public init(progress: CGFloat) {
        self.progress = progress
    }
    
    public var body: some View {
        return GeometryReader { geometry in
            ZStack(alignment: .leading) {
                Rectangle()
                    .opacity(0.1)
                    .cornerRadius(self.barHeight/2)
                    .animation(nil)
                Rectangle()
                    .foregroundColor(Color.accentColor)
                    .frame(width: geometry.size.width * self.progress)
                    .cornerRadius(self.barHeight/2)

            }
        }
        .frame(height: barHeight)
    }<commit_msg>Add note about replacing ProgressView<commit_after>//
//  ProgressView.swift
//  DashKitUI
//
//  Created by <NAME> on 3/2/20.
//  Copyright © 2020 LoopKit Authors. All rights reserved.
//

import SwiftUI

// TODO: SwiftUI now has built in ProgressView to replace this

public struct ProgressView: View {
    
    private let progress: CGFloat
    
    private let barHeight: CGFloat = 8
    
    public init(progress: CGFloat) {
        self.progress = progress
    }
    
    public var body: some View {
        return GeometryReader { geometry in
            ZStack(alignment: .leading) {
                Rectangle()
                    .opacity(0.1)
                    .cornerRadius(self.barHeight/2)
                    .animation(nil)
                Rectangle()
                    .foregroundColor(Color.accentColor)
                    .frame(width: geometry.size.width * self.progress)
                    .cornerRadius(self.barHeight/2)

            }
        }
        .frame(height: barHeight)
    }
{'fraction_non_alphanumeric': 0.09020618556701031, 'fraction_numerical': 0.013402061855670102, 'mean_word_length': 1.5372549019607844, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3498383', 'n_tokens_mistral': 569, 'n_tokens_neox': 520, 'n_words': 132}