-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
#350 Bottom Drawer #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
#350 Bottom Drawer #423
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
60d0b1a
Save
StefKors 2f5dcc2
Merge branch 'main' into Bottom-Drawer-#350
StefKors e2523cb
Use SegmentedControl
StefKors 49ebb9e
Remove appstorage
StefKors fcc3ae8
uniform add explicit type
StefKors e278fa0
update Icons and add buttons
StefKors d53a252
Merge branch 'main' into Bottom-Drawer-#350
StefKors 7afdc3b
Delete StatusBarTabButton.swift
StefKors 752b902
Add Design dependency to StatusBar Module
StefKors 17c92b1
Design >> CodeEditUI
StefKors c771c4a
Update StatusBar.swift
StefKors e751547
Don't collapse statusbar when switching files
StefKors 38c0bf1
Merge branch 'main' into Bottom-Drawer-#350
StefKors 1218756
Swap safeAreaInset for ZStack
StefKors c34f374
Remove trailing space
StefKors File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
CodeEdit/Assets.xcassets/custom.breakpoint.symbolset/Contents.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "symbols" : [ | ||
| { | ||
| "filename" : "custom.breakpoint.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ] | ||
| } |
167 changes: 167 additions & 0 deletions
167
CodeEdit/Assets.xcassets/custom.breakpoint.symbolset/custom.breakpoint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
53 changes: 53 additions & 0 deletions
53
CodeEditModules/Modules/StatusBar/src/StatusBarItems/FilterTextField.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // | ||
| // FilterTextField.swift | ||
| // | ||
| // | ||
| // Created by Stef Kors on 12/04/2022. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| struct FilterTextField: View { | ||
| let title: String | ||
|
|
||
| @Binding | ||
| var text: String | ||
|
|
||
| var body: some View { | ||
| HStack { | ||
| Image(systemName: "line.3.horizontal.decrease.circle") | ||
| .foregroundColor(Color(nsColor: .secondaryLabelColor)) | ||
| textField | ||
| if !text.isEmpty { clearButton } | ||
| } | ||
| .padding(.horizontal, 5) | ||
| .padding(.vertical, 3) | ||
| .overlay( | ||
| RoundedRectangle(cornerRadius: 4) | ||
| .stroke(Color.gray, lineWidth: 0.5).cornerRadius(4) | ||
| ) | ||
| } | ||
|
|
||
| private var textField: some View { | ||
| TextField(title, text: $text) | ||
| .disableAutocorrection(true) | ||
| .textFieldStyle(PlainTextFieldStyle()) | ||
| } | ||
|
|
||
| private var clearButton: some View { | ||
| Button { | ||
| self.text = "" | ||
| } label: { | ||
| Image(systemName: "xmark.circle.fill") | ||
| } | ||
| .foregroundColor(.secondary) | ||
| .buttonStyle(PlainButtonStyle()) | ||
| } | ||
| } | ||
|
|
||
| struct FilterTextField_Previews: PreviewProvider { | ||
| static var previews: some View { | ||
| FilterTextField(title: "Filter", text: .constant("")) | ||
| FilterTextField(title: "Filter", text: .constant("codeedi")) | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
CodeEditModules/Modules/StatusBar/src/StatusBarItems/StatusBarClearButton.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // | ||
| // StatusBarClearButton.swift | ||
| // | ||
| // | ||
| // Created by Stef Kors on 12/04/2022. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| internal struct StatusBarClearButton: View { | ||
| @ObservedObject | ||
| private var model: StatusBarModel | ||
|
|
||
| internal init(model: StatusBarModel) { | ||
| self.model = model | ||
| } | ||
|
|
||
| internal var body: some View { | ||
| Button(action: clearTerminal, label: { | ||
StefKors marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Image(systemName: "trash") | ||
| .foregroundColor(.secondary) | ||
| }).buttonStyle(.plain) | ||
StefKors marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| internal func clearTerminal() { | ||
| // TODO: implement | ||
| } | ||
| } | ||
|
|
||
| struct StatusBarClearButton_Previews: PreviewProvider { | ||
| static var previews: some View { | ||
| let url = URL(string: "~/Developer")! | ||
| StatusBarClearButton(model: StatusBarModel(workspaceURL: url)) | ||
| } | ||
| } | ||
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
35 changes: 35 additions & 0 deletions
35
CodeEditModules/Modules/StatusBar/src/StatusBarItems/StatusBarMaximizeButton.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // | ||
| // StatusBarMaximizeButton.swift | ||
| // | ||
| // | ||
| // Created by Stef Kors on 12/04/2022. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| internal struct StatusBarMaximizeButton: View { | ||
| @ObservedObject | ||
| private var model: StatusBarModel | ||
|
|
||
| internal init(model: StatusBarModel) { | ||
| self.model = model | ||
| } | ||
|
|
||
| internal var body: some View { | ||
| Button(action: toggleMaximize, label: { | ||
StefKors marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Image(systemName: "arrowtriangle.up.square") | ||
| .foregroundColor(model.isMaximized ? .accentColor : .primary) | ||
| }).buttonStyle(.plain) | ||
| } | ||
|
|
||
| internal func toggleMaximize() { | ||
| model.isMaximized.toggle() | ||
| } | ||
| } | ||
|
|
||
| struct StatusBarMaximizeButton_Previews: PreviewProvider { | ||
| static var previews: some View { | ||
| let url = URL(string: "~/Developer")! | ||
| StatusBarMaximizeButton(model: StatusBarModel(workspaceURL: url)) | ||
| } | ||
| } | ||
20 changes: 20 additions & 0 deletions
20
CodeEditModules/Modules/StatusBar/src/StatusBarItems/StatusBarTabButton.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // | ||
| // StatusBarTabButton.swift | ||
| // | ||
| // | ||
| // Created by Stef Kors on 12/04/2022. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| struct StatusBarTabButton: View { | ||
| var body: some View { | ||
| Text("Hello, World!") | ||
| } | ||
| } | ||
|
|
||
| struct StatusBarTabButton_Previews: PreviewProvider { | ||
| static var previews: some View { | ||
| StatusBarTabButton() | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.