Skip to content

Commit e760191

Browse files
Renamed PathBar to JumpBar (#1957)
* Renamed PathBar to JumpBar * Renamed variables from pathBar to jumpBar
1 parent 8448cfa commit e760191

File tree

10 files changed

+53
-54
lines changed

10 files changed

+53
-54
lines changed

CodeEdit.xcodeproj/project.pbxproj

+15-15
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@
132132
5878DAA6291AE76700DD95A3 /* OpenQuicklyPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAA2291AE76700DD95A3 /* OpenQuicklyPreviewView.swift */; };
133133
5878DAA7291AE76700DD95A3 /* OpenQuicklyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAA3291AE76700DD95A3 /* OpenQuicklyViewModel.swift */; };
134134
5878DAA8291AE76700DD95A3 /* OpenQuicklyListItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAA4291AE76700DD95A3 /* OpenQuicklyListItemView.swift */; };
135-
5878DAB0291D627C00DD95A3 /* EditorPathBarMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAD291D627C00DD95A3 /* EditorPathBarMenu.swift */; };
136-
5878DAB1291D627C00DD95A3 /* EditorPathBarComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAE291D627C00DD95A3 /* EditorPathBarComponent.swift */; };
137-
5878DAB2291D627C00DD95A3 /* EditorPathBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAF291D627C00DD95A3 /* EditorPathBarView.swift */; };
135+
5878DAB0291D627C00DD95A3 /* EditorJumpBarMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAD291D627C00DD95A3 /* EditorJumpBarMenu.swift */; };
136+
5878DAB1291D627C00DD95A3 /* EditorJumpBarComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAE291D627C00DD95A3 /* EditorJumpBarComponent.swift */; };
137+
5878DAB2291D627C00DD95A3 /* EditorJumpBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5878DAAF291D627C00DD95A3 /* EditorJumpBarView.swift */; };
138138
58798218292D92370085B254 /* String+SafeOffset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798213292D92370085B254 /* String+SafeOffset.swift */; };
139139
58798219292D92370085B254 /* SearchModeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798215292D92370085B254 /* SearchModeModel.swift */; };
140140
5879821A292D92370085B254 /* SearchResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798216292D92370085B254 /* SearchResultModel.swift */; };
@@ -827,9 +827,9 @@
827827
5878DAA2291AE76700DD95A3 /* OpenQuicklyPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyPreviewView.swift; sourceTree = "<group>"; };
828828
5878DAA3291AE76700DD95A3 /* OpenQuicklyViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyViewModel.swift; sourceTree = "<group>"; };
829829
5878DAA4291AE76700DD95A3 /* OpenQuicklyListItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyListItemView.swift; sourceTree = "<group>"; };
830-
5878DAAD291D627C00DD95A3 /* EditorPathBarMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorPathBarMenu.swift; sourceTree = "<group>"; };
831-
5878DAAE291D627C00DD95A3 /* EditorPathBarComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorPathBarComponent.swift; sourceTree = "<group>"; };
832-
5878DAAF291D627C00DD95A3 /* EditorPathBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorPathBarView.swift; sourceTree = "<group>"; };
830+
5878DAAD291D627C00DD95A3 /* EditorJumpBarMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorJumpBarMenu.swift; sourceTree = "<group>"; };
831+
5878DAAE291D627C00DD95A3 /* EditorJumpBarComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorJumpBarComponent.swift; sourceTree = "<group>"; };
832+
5878DAAF291D627C00DD95A3 /* EditorJumpBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorJumpBarView.swift; sourceTree = "<group>"; };
833833
58798213292D92370085B254 /* String+SafeOffset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+SafeOffset.swift"; sourceTree = "<group>"; };
834834
58798215292D92370085B254 /* SearchModeModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchModeModel.swift; sourceTree = "<group>"; };
835835
58798216292D92370085B254 /* SearchResultModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchResultModel.swift; sourceTree = "<group>"; };
@@ -1933,20 +1933,20 @@
19331933
path = ViewModels;
19341934
sourceTree = "<group>";
19351935
};
1936-
5878DAAB291D627C00DD95A3 /* PathBar */ = {
1936+
5878DAAB291D627C00DD95A3 /* JumpBar */ = {
19371937
isa = PBXGroup;
19381938
children = (
19391939
5878DAAC291D627C00DD95A3 /* Views */,
19401940
);
1941-
path = PathBar;
1941+
path = JumpBar;
19421942
sourceTree = "<group>";
19431943
};
19441944
5878DAAC291D627C00DD95A3 /* Views */ = {
19451945
isa = PBXGroup;
19461946
children = (
1947-
5878DAAD291D627C00DD95A3 /* EditorPathBarMenu.swift */,
1948-
5878DAAE291D627C00DD95A3 /* EditorPathBarComponent.swift */,
1949-
5878DAAF291D627C00DD95A3 /* EditorPathBarView.swift */,
1947+
5878DAAD291D627C00DD95A3 /* EditorJumpBarMenu.swift */,
1948+
5878DAAE291D627C00DD95A3 /* EditorJumpBarComponent.swift */,
1949+
5878DAAF291D627C00DD95A3 /* EditorJumpBarView.swift */,
19501950
);
19511951
path = Views;
19521952
sourceTree = "<group>";
@@ -2864,7 +2864,7 @@
28642864
6C147C3C29A328020089B630 /* Editor */ = {
28652865
isa = PBXGroup;
28662866
children = (
2867-
5878DAAB291D627C00DD95A3 /* PathBar */,
2867+
5878DAAB291D627C00DD95A3 /* JumpBar */,
28682868
287776EB27E350BA00D46668 /* TabBar */,
28692869
B67660642AA970ED00CD56B0 /* Models */,
28702870
B67660632AA970E300CD56B0 /* Views */,
@@ -4109,7 +4109,7 @@
41094109
58D01C9B293167DC00C5B6B4 /* CodeEditKeychainConstants.swift in Sources */,
41104110
B640A99E29E2184700715F20 /* SettingsForm.swift in Sources */,
41114111
B62AEDD12A27B264009A9F52 /* View+paneToolbar.swift in Sources */,
4112-
5878DAB1291D627C00DD95A3 /* EditorPathBarComponent.swift in Sources */,
4112+
5878DAB1291D627C00DD95A3 /* EditorJumpBarComponent.swift in Sources */,
41134113
B628B7B72B223BAD00F9775A /* FindModePicker.swift in Sources */,
41144114
587B9E6E29301D8F00AC7927 /* GitLabProject.swift in Sources */,
41154115
58798234292E30B90085B254 /* FeedbackIssueArea.swift in Sources */,
@@ -4476,7 +4476,7 @@
44764476
58D01C99293167DC00C5B6B4 /* String+MD5.swift in Sources */,
44774477
20EBB505280C329800F3A5DA /* CommitListItemView.swift in Sources */,
44784478
669A50512C380C1800304CD8 /* String+escapedWhiteSpaces.swift in Sources */,
4479-
5878DAB2291D627C00DD95A3 /* EditorPathBarView.swift in Sources */,
4479+
5878DAB2291D627C00DD95A3 /* EditorJumpBarView.swift in Sources */,
44804480
664935422C35A5BC00461C35 /* NSTableViewWrapper.swift in Sources */,
44814481
04BC1CDE2AD9B4B000A83EA5 /* EditorFileTabCloseButton.swift in Sources */,
44824482
6C6BD70129CD172700235D17 /* ExtensionsListView.swift in Sources */,
@@ -4501,7 +4501,7 @@
45014501
587B9E7229301D8F00AC7927 /* GitJSONPostRouter.swift in Sources */,
45024502
6C6362D42C3E321A0025570D /* Editor+History.swift in Sources */,
45034503
6C85BB412C21061A00EB5DEF /* GitHubComment.swift in Sources */,
4504-
5878DAB0291D627C00DD95A3 /* EditorPathBarMenu.swift in Sources */,
4504+
5878DAB0291D627C00DD95A3 /* EditorJumpBarMenu.swift in Sources */,
45054505
04BA7C242AE2E7CD00584E1C /* SourceControlNavigatorSyncView.swift in Sources */,
45064506
587B9DA529300ABD00AC7927 /* PressActionsModifier.swift in Sources */,
45074507
6C147C4029A328BC0089B630 /* SplitViewData.swift in Sources */,

CodeEdit/Features/Editor/PathBar/Views/EditorPathBarComponent.swift renamed to CodeEdit/Features/Editor/JumpBar/Views/EditorJumpBarComponent.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
2-
// PathBar.swift
3-
// CodeEditModules/PathBar
2+
// EditorJumpBar.swift
3+
// CodeEdit
44
//
55
// Created by Lukas Pistrol on 18.03.22.
66
//
@@ -9,7 +9,7 @@ import SwiftUI
99
import Combine
1010
import CodeEditSymbols
1111

12-
struct EditorPathBarComponent: View {
12+
struct EditorJumpBarComponent: View {
1313
private let fileItem: CEWorkspaceFile
1414
private let tappedOpenFile: (CEWorkspaceFile) -> Void
1515
private let isLastItem: Bool
@@ -54,7 +54,7 @@ struct EditorPathBarComponent: View {
5454
NSPopUpButtonView(selection: $selection) {
5555
guard let fileManager = workspace.workspaceFileManager else { return NSPopUpButton() }
5656

57-
button.menu = EditorPathBarMenu(
57+
button.menu = EditorJumpBarMenu(
5858
fileItems: siblings,
5959
fileManager: fileManager,
6060
tappedOpenFile: tappedOpenFile

CodeEdit/Features/Editor/PathBar/Views/EditorPathBarMenu.swift renamed to CodeEdit/Features/Editor/JumpBar/Views/EditorJumpBarMenu.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// EditorPathBarMenu.swift
3-
// CodeEditModules/PathBar
2+
// EditorJumpBarMenu.swift
3+
// CodeEdit
44
//
55
// Created by Ziyuan Zhao on 2022/3/29.
66
//
77

88
import AppKit
99

10-
final class EditorPathBarMenu: NSMenu, NSMenuDelegate {
10+
final class EditorJumpBarMenu: NSMenu, NSMenuDelegate {
1111
private let fileItems: [CEWorkspaceFile]
1212
private weak var fileManager: CEWorkspaceFileManager?
1313
private let tappedOpenFile: (CEWorkspaceFile) -> Void
@@ -23,7 +23,7 @@ final class EditorPathBarMenu: NSMenu, NSMenuDelegate {
2323
super.init(title: "")
2424
delegate = self
2525
fileItems.forEach { item in
26-
let menuItem = PathBarMenuItem(fileItem: item, tappedOpenFile: tappedOpenFile)
26+
let menuItem = JumpBarMenuItem(fileItem: item, tappedOpenFile: tappedOpenFile)
2727
menuItem.onStateImage = nil
2828
self.addItem(menuItem)
2929
}
@@ -44,10 +44,10 @@ final class EditorPathBarMenu: NSMenu, NSMenuDelegate {
4444
}
4545
}
4646

47-
private func generateSubmenu(_ fileItem: CEWorkspaceFile) -> EditorPathBarMenu? {
47+
private func generateSubmenu(_ fileItem: CEWorkspaceFile) -> EditorJumpBarMenu? {
4848
if let fileManager = fileManager,
4949
let children = fileManager.childrenOfFile(fileItem) {
50-
let menu = EditorPathBarMenu(
50+
let menu = EditorJumpBarMenu(
5151
fileItems: children,
5252
fileManager: fileManager,
5353
tappedOpenFile: tappedOpenFile
@@ -58,7 +58,7 @@ final class EditorPathBarMenu: NSMenu, NSMenuDelegate {
5858
}
5959
}
6060

61-
final class PathBarMenuItem: NSMenuItem {
61+
final class JumpBarMenuItem: NSMenuItem {
6262
private let fileItem: CEWorkspaceFile
6363
private let tappedOpenFile: (CEWorkspaceFile) -> Void
6464
private let generalSettings = Settings.shared.preferences.general

CodeEdit/Features/Editor/PathBar/Views/EditorPathBarView.swift renamed to CodeEdit/Features/Editor/JumpBar/Views/EditorJumpBarView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// EditorPathBarView.swift
3-
// CodeEditModules/PathBar
2+
// EditorJumpBarView.swift
3+
// CodeEdit
44
//
55
// Created by Lukas Pistrol on 17.03.22.
66
//
77

88
import SwiftUI
99

10-
struct EditorPathBarView: View {
10+
struct EditorJumpBarView: View {
1111
private let file: CEWorkspaceFile?
1212
private let shouldShowTabBar: Bool
1313
private let tappedOpenFile: (CEWorkspaceFile) -> Void
@@ -58,7 +58,7 @@ struct EditorPathBarView: View {
5858
)
5959
} else {
6060
ForEach(fileItems, id: \.self) { fileItem in
61-
EditorPathBarComponent(
61+
EditorJumpBarComponent(
6262
fileItem: fileItem,
6363
tappedOpenFile: tappedOpenFile,
6464
isLastItem: fileItems.last == fileItem

CodeEdit/Features/Editor/Views/EditorAreaView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import SwiftUI
99
import CodeEditTextView
1010

1111
struct EditorAreaView: View {
12-
@AppSettings(\.general.showEditorPathBar)
13-
var showEditorPathBar
12+
@AppSettings(\.general.showEditorJumpBar)
13+
var showEditorJumpBar
1414

1515
@AppSettings(\.navigation.navigationStyle)
1616
var navigationStyle
@@ -43,8 +43,8 @@ struct EditorAreaView: View {
4343

4444
var editorInsetAmount: Double {
4545
let tabBarHeight = shouldShowTabBar ? (EditorTabBarView.height + 1) : 0
46-
let pathBarHeight = showEditorPathBar ? (EditorPathBarView.height + 1) : 0
47-
return tabBarHeight + pathBarHeight
46+
let jumpBarHeight = showEditorJumpBar ? (EditorJumpBarView.height + 1) : 0
47+
return tabBarHeight + jumpBarHeight
4848
}
4949

5050
VStack {
@@ -89,8 +89,8 @@ struct EditorAreaView: View {
8989
.environmentObject(editor)
9090
Divider()
9191
}
92-
if showEditorPathBar {
93-
EditorPathBarView(
92+
if showEditorJumpBar {
93+
EditorJumpBarView(
9494
file: editor.selectedTab?.file,
9595
shouldShowTabBar: shouldShowTabBar
9696
) { [weak editor] newFile in

CodeEdit/Features/InspectorArea/Views/InspectorAreaView.swift

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import SwiftUI
99

1010
struct InspectorAreaView: View {
1111
@EnvironmentObject private var workspace: WorkspaceDocument
12-
1312
@ObservedObject private var extensionManager = ExtensionManager.shared
1413
@ObservedObject public var viewModel: InspectorAreaViewModel
1514

CodeEdit/Features/Settings/Pages/GeneralSettings/GeneralSettingsView.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct GeneralSettingsView: View {
3737
Section {
3838
appearance
3939
fileIconStyle
40-
showEditorPathBar
40+
showEditorJumpBar
4141
dimEditorsWithoutFocus
4242
navigatorTabBarPosition
4343
inspectorTabBarPosition
@@ -105,8 +105,8 @@ private extension GeneralSettingsView {
105105
Toggle("Show Live Issues", isOn: $settings.showLiveIssues)
106106
}
107107

108-
var showEditorPathBar: some View {
109-
Toggle("Show Path Bar", isOn: $settings.showEditorPathBar)
108+
var showEditorJumpBar: some View {
109+
Toggle("Show Jump Bar", isOn: $settings.showEditorJumpBar)
110110
}
111111

112112
var dimEditorsWithoutFocus: some View {

CodeEdit/Features/Settings/Pages/GeneralSettings/Models/GeneralSettings.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension SettingsData {
2727
"Appearance",
2828
"File Icon Style",
2929
"Tab Bar Style",
30-
"Show Path Bar",
30+
"Show Jump Bar",
3131
"Dim editors without focus",
3232
"Navigator Tab Bar Position",
3333
"Inspector Tab Bar Position",
@@ -51,8 +51,8 @@ extension SettingsData {
5151
.map { NSLocalizedString($0, comment: "") }
5252
}
5353

54-
/// Show editor path bar
55-
var showEditorPathBar: Bool = true
54+
/// Show editor jump bar
55+
var showEditorJumpBar: Bool = true
5656

5757
/// Dims editors without focus
5858
var dimEditorsWithoutFocus: Bool = false
@@ -115,9 +115,9 @@ extension SettingsData {
115115
Bool.self,
116116
forKey: .showLiveIssues
117117
) ?? true
118-
self.showEditorPathBar = try container.decodeIfPresent(
118+
self.showEditorJumpBar = try container.decodeIfPresent(
119119
Bool.self,
120-
forKey: .showEditorPathBar
120+
forKey: .showEditorJumpBar
121121
) ?? true
122122
self.dimEditorsWithoutFocus = try container.decodeIfPresent(
123123
Bool.self,

CodeEdit/Features/WindowCommands/ViewCommands.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ struct ViewCommands: Commands {
1313
var editorFontSize
1414
@AppSettings(\.terminal.font.size)
1515
var terminalFontSize
16-
@AppSettings(\.general.showEditorPathBar)
17-
var showEditorPathBar
16+
@AppSettings(\.general.showEditorJumpBar)
17+
var showEditorJumpBar
1818
@AppSettings(\.general.dimEditorsWithoutFocus)
1919
var dimEditorsWithoutFocus
2020

@@ -75,8 +75,8 @@ struct ViewCommands: Commands {
7575

7676
Divider()
7777

78-
Button("\(showEditorPathBar ? "Hide" : "Show") Path Bar") {
79-
showEditorPathBar.toggle()
78+
Button("\(showEditorJumpBar ? "Hide" : "Show") Jump Bar") {
79+
showEditorJumpBar.toggle()
8080
}
8181

8282
Toggle("Dim editors without focus", isOn: $dimEditorsWithoutFocus)

Documentation.docc/App Window/App Window.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ A collection of all the views that make up the main app window.
2020
- ``ImageFileView``
2121
- ``PDFFileView``
2222

23-
### PathBar
23+
### JumpBar
2424

25-
- ``PathBarView``
26-
- ``PathBarComponent``
27-
- ``PathBarMenu``
28-
- ``PathBarMenuItem``
25+
- ``JumpBarView``
26+
- ``JumpBarComponent``
27+
- ``JumpBarMenu``
28+
- ``JumpBarMenuItem``
2929

3030
### Navigator Sidebar
3131

0 commit comments

Comments
 (0)