Custom(izable) Navigator Sidebar Implementation#231
Custom(izable) Navigator Sidebar Implementation#231lukepistrol merged 11 commits intoCodeEditApp:mainfrom
Conversation
|
Also I think the blue or gray highlight has a blend mode applied. Give me a second and I will find that out for you. |
|
Here is the list selection background specification (to my best understanding). Light Mode Focused Selection Color
Dark Mode Focused Selection Color
Light Mode Unfocused Selection Color
Dark Mode Unfocused Selection Color
Other considerations
ReferencesTo gather the above information, I referred to Apple's own Sketch design resource. Despite my findings, I am seeing some inconsistency when I apply this in Sketch vs Figma. I have been searching to find if Apple provides a variable to get this exact background but haven't found anything yet. I have posted in the Apple developer forums here to see if anyone else has any insight on this. |
|
@austincondiff updated the colors & corner radius. also adjusted the spacing to match Xcodes sidebar. |
|
@lukepistrol can we keep the sidebar named "NavigatorSidebar"? I would like to reference our sidebars by function (navigator, inspector - this is what Xcode calls them) rather than location (leading, trailing). If you have a particular reason why we shouldn't do that I am open to it though! |
Because I think the leading sidebar contains multiple functions(navigator, search...) You can see more here |
I will rename like so:
So that it matches Xcodes description |
…> `ProjectNavigator`, `SidebarSearch` -> `FindNavigator`
I think it's more like 45% |
|
@austincondiff just need your approval then I'll merge |
Oops. Forgot to update them. Spacing still needs to be fixed. |






Description
The main problem of SwiftUI's implemented sidebar is, that it is not very customizable and only brings native selection state when using
NavigationLink. This has the downside of opening a whole new detail view every time a file is selected from the sidebar.The new Sidebar uses
Listsselectionproperty to get the current selected file and set the document in the Code EditorThings that need to be fixed:
contextMenuis shown. (help wanted)Localization ofcontextMenucorner radiusof selected sidebar item needs to be slightly largerReleated Issue
#123
Checklist (for drafts):
Screenshots:
Screen.Recording.2022-03-24.at.17.24.54.mov