Combined area tab bar views into single reusable view #1289
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.
Description
Refactored to combine all area tab bars including NavigatorTabBar, InspectorTabBar, and DebugAreaTabBar into one reusable view.
Related Issues
n/a
Checklist
Screenshots
No visual change
Additional Considerations
I named the reusable view AreaTabBar and the reusable type AreaTab. I considered SidebarTab and IconTab. Because this now includes the debug area (which is not a sidebar) SidebarTab was out. My thought was that Apple calls it the Navigator Area, Inspector Area, and Debug Area in Xcode which we do as well. They are all areas so that was my logic. However, I am open to suggestion here as AreaTab may not be extremely clear.
I'd really like some feedback on this new approach as we are no longer using the enums @Wouter01 put into place. Instead we use an array of AreaTab that have a closure to include the view we want to use when the tab is active. Then instead of the switch, we simply do
selection.contentView()as selection is a AreaTab.This PR merges into the debug area tabs branch.