Skip to content
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

[chore] Rename tabgroup to editor and more #1418

Merged

Conversation

austincondiff
Copy link
Collaborator

@austincondiff austincondiff commented Sep 5, 2023

Description

Xcode calls each split within a split editor layout an "editor". We currently call it a "tab group". This PR renames this to be consistent.

Renames the following:

  • tab group → editor layout
  • tab group data → editor
  • workspace editor view → editor view
  • tab bar item → tab bar tab
  • navigator sidebar → navigator area
  • inspector sidebar → inspector area
  • debug area → utility area

The "Editor" (previously "TabGroup") folder has been moved out of the "TabBar" (previously to "Tabs") folder

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

…is opened from the project navigator or open quickly overlay, and when a different editor is selected in a split layout.
…pector sidebar to inspector area, debug area to utility area, and tab bar item to tab bar tab.
CodeEdit/Features/TabBar/Views/TabBarView.swift Outdated Show resolved Hide resolved
@austincondiff austincondiff dismissed thecoolwinter’s stale review September 5, 2023 14:00

Made requested changes

@matthijseikelenboom
Copy link
Contributor

Maybe use EditorTab instead of TabBarTab. It might be literally what it is, but doesn't read nice and it's not a good name imo. Just naming it Tab is too ambiguous, because we have tabs at multiple places. Technically those are also TabBars, in the inspector for example. EditorTab indicates that is a Tab of the Editor.

If anyone else has another suggestion, of course please do

@austincondiff
Copy link
Collaborator Author

@matthijseikelenboom should we call it the EditorTabBar, EditorTab, and EditorPathBar then?

…torTabBar, PathBar to EditorPathBar. Organized files throughout project.
@matthijseikelenboom
Copy link
Contributor

@austincondiff Yeah I think that would be a good idea

@austincondiff
Copy link
Collaborator Author

austincondiff commented Sep 7, 2023

@matthijseikelenboom i did that and more in this commit.

One thing I also did was move TabBar and PathBar into Editor and prefix both with Editor.

@0xWDG
Copy link
Collaborator

0xWDG commented Sep 7, 2023

It does not compile on my machine.
https://github.com/austincondiff/CodeEdit/blob/refactor-rename-tabgroup/CodeEdit/CodeEditApp.swift#L53

image

If I remove that line, it fails on:
image

#if swift(>=5.9) // Fix build on Xcode 14
.inspector(isPresented: $showInspector) {
InspectorSidebarView()
.inspectorColumnWidth(min: 100, ideal: 200, max: 400)
.toolbar {
Spacer()
Button {
showInspector.toggle()
} label: {
Image(systemName: "sidebar.right")
.imageScale(.large)
}
}
}
#endif

it seems to be renamed to InspectorAreaView: https://github.com/CodeEditApp/CodeEdit/pull/1418/files#diff-024df5faeb896bb7bb049cb03aa87509e613224eb10723a930e1b2574ec75807L10

@austincondiff
Copy link
Collaborator Author

@0xWDG good catch! I am not yet on Sonoma so that would explain why it is compiling on my machine just fine. Try again. Lmk if it works.

@matthijseikelenboom
Copy link
Contributor

Don't know if Sonoma has anything to do with it. Could also be your build cache

@Wouter01
Copy link
Member

Wouter01 commented Sep 7, 2023

It does not compile on my machine. https://github.com/austincondiff/CodeEdit/blob/refactor-rename-tabgroup/CodeEdit/CodeEditApp.swift#L53

image

This issue can be fixed by resetting Swift package caches.

@austincondiff austincondiff merged commit 4a8f093 into CodeEditApp:main Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants