Repository: CodeEditApp/CodeEdit
File: CodeEditModules/Modules/AppPreferences/src/Sections/GeneralPreferences/GeneralPreferencesView.swift (Swift)

Code before:
            .labelsHidden()
            .frame(width: inputWidth)

            Toggle("Show Live Issues", isOn: $prefs.preferences.general.showLiveIssues)
                .toggleStyle(.checkbox)
        }
        .disabled(true)
    }

    var fileExtensionsSection: some View {
        PreferencesSection("File Extensions") {
            Picker("File Extensions:", selection: $prefs.preferences.general.fileExtensions) {
                Text("Hide all")
                    .tag(AppPreferences.FileExtensions.hideAll)
                Text("Show all")
                    .tag(AppPreferences.FileExtensions.showAll)
                Divider()
                Text("Show only")
                    .tag(AppPreferences.FileExtensions.showOnly)
            }
            .frame(width: inputWidth)
            if case .showOnly = prefs.preferences.general.fileExtensions {
                let showedFileExtensionsBinding = Binding(get: {
                    prefs.preferences.general.fileExtensionsShowed.extensions.joined(separator: ", ")
                }, set: { newValue in
                    let components = newValue.components(separatedBy: ", ")
                    prefs.preferences.general.fileExtensionsShowed.extensions = components
                })
                TextEditor(text: showedFileExtensionsBinding)
                    .frame(width: textEditorWidth)
                    .textFieldStyle(.squareBorder)
            }
        }
    }

    var fileIconStyleSection: some View {
        PreferencesSection("File Icon Style") {
            Picker("File Icon Style:", selection: $prefs.preferences.general.fileIconStyle) {
                Text("Color")
                    .tag(AppPreferences.FileIconStyle.color)
                Text("Monochrome")
                    .tag(AppPreferences.FileIconStyle.monochrome)
            }
            .pickerStyle(.radioGroup)
        }
    }

    var tabBarStyleSection: some View {
        PreferencesSection("Tab Bar Style") {
            Picker("Tab Bar Style:", selection: $prefs.preferences.general.tabBarStyle) {
                Text("Xcode")

Review comment (suggestion):
It would be better to use the following:
```swift
newValue.components(separatedBy: ",").trimmingCharacters(in: .whitespacesAndNewlines)
```

That way we also respect values entered without a space character.

Code after:
                tag.applyAppearance()
            }
            .frame(width: inputWidth)
        }
    }

    // TODO: Implement reflecting Show Issues preference and remove disabled modifier
    var showIssuesSection: some View {
        PreferencesSection("Show Issues", hideLabels: false) {
            Picker("Show Issues", selection: $prefs.preferences.general.showIssues) {
                Text("Show Inline")
                    .tag(AppPreferences.Issues.inline)
                Text("Show Minimized")
                    .tag(AppPreferences.Issues.minimized)
            }
            .labelsHidden()
            .frame(width: inputWidth)

            Toggle("Show Live Issues", isOn: $prefs.preferences.general.showLiveIssues)
                .toggleStyle(.checkbox)
        }
        .disabled(true)
    }

    var fileExtensionsSection: some View {
        PreferencesSection("File Extensions") {
            Picker("File Extensions:", selection: $prefs.preferences.general.fileExtensionsVisibility) {
                Text("Hide all")
                    .tag(AppPreferences.FileExtensionsVisibility.hideAll)
                Text("Show all")
                    .tag(AppPreferences.FileExtensionsVisibility.showAll)
                Divider()
                Text("Show only")
                    .tag(AppPreferences.FileExtensionsVisibility.showOnly)
                Text("Hide only")
                    .tag(AppPreferences.FileExtensionsVisibility.hideOnly)
            }
            .frame(width: inputWidth)
            if case .showOnly = prefs.preferences.general.fileExtensionsVisibility {
                SettingsTextEditor(text: $prefs.preferences.general.shownFileExtensions.string)
                    .frame(width: textEditorWidth)
                    .frame(height: textEditorHeight)
            }
            if case .hideOnly = prefs.preferences.general.fileExtensionsVisibility {
                SettingsTextEditor(text: $prefs.preferences.general.hiddenFileExtensions.string)
                .frame(width: textEditorWidth)
                .frame(height: textEditorHeight)
            }
        }
    }