Top toolbar by maoyama · Pull Request #169 · maoyama/Changes (original) (raw)

@maoyama

@maoyama

@maoyama

@maoyama

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the top toolbar in FolderView by refactoring how toolbar items are conditionally rendered based on loading state and macOS version. It replaces the navigationToolbar() function with a dedicated branchesButton() and introduces macOS 26 availability checks for certain toolbar items.

GitClient/Views/Folder/FolderView.swift:312

fileprivate func branchesButton() -> some View {
if isLoading {
ProgressView()
.scaleEffect(x: 0.5, y: 0.5, anchor: .center)
if #available(macOS 26.0, *) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The progress view configuration is duplicated for macOS 26 and the alternative case. Consider extracting the common ProgressView configuration into a helper view to reduce repetition.

Copilot uses AI. Check for mistakes.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})