-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter scoping and file path status bar view (#18)
* scope selection to search current dump or all dumps * filepath statusbar on code editor to identify origin * hover text on file row to identify origin when searching all
- Loading branch information
Showing
11 changed files
with
200 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import SwiftUI | ||
|
||
struct FilePathView: View { | ||
var folderName: String | ||
var fileName: String | ||
|
||
var body: some View { | ||
ScrollView(.horizontal) { | ||
HStack { | ||
HStack(spacing: 4) { | ||
Image(systemName: "folder.fill") | ||
.foregroundColor(.accentColor) | ||
Text(folderName) | ||
} | ||
|
||
Image(systemName: "chevron.right") | ||
.imageScale(.small) | ||
|
||
HStack(spacing: 4) { | ||
Image(systemName: "doc.fill") | ||
.foregroundColor(.accentColor) | ||
Text(fileName) | ||
.accessibilityIdentifier(Keys.Detail.PathBarFile) | ||
} | ||
} | ||
.padding(.horizontal, 15) | ||
.padding(.bottom, 5) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
} | ||
.accessibilityIdentifier(Keys.Detail.PathBar) | ||
} | ||
} | ||
|
||
#Preview { | ||
FilePathView(folderName: "Test App", fileName: "TestFile.swift") | ||
} | ||
|
||
#Preview { | ||
FilePathView( | ||
folderName: "Test App", | ||
fileName: "TestFileWithReallyLongNameThatShouldTruncateInTheMiddleIfItGetsLongerThanExpected.swift" | ||
) | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import SwiftUI | ||
|
||
struct FilterScopeView: View { | ||
@AppStorage("scopedSearchPreference") var scopedSearchPreference = Preferences.Defaults.scopedSearch | ||
|
||
func getFilterText(_ filter: Preferences.FilterScope) -> String { | ||
switch filter { | ||
case .default: "Show selected" | ||
case .all: "Show all" | ||
default: "Unhandled filter" | ||
} | ||
} | ||
|
||
var body: some View { | ||
Picker("", selection: $scopedSearchPreference) { | ||
ForEach(Preferences.FilterScope.allCases) { filter in | ||
Text(getFilterText(filter)).tag(filter) | ||
} | ||
} | ||
.accessibilityIdentifier(Keys.Filters.FilterFiles) | ||
.pickerStyle(.menu) | ||
.fixedSize() | ||
} | ||
} | ||
|
||
#Preview { | ||
FilterScopeView() | ||
} |
This file contains 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
This file contains 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