-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Sync file selection state between tab group and outline view #1296
Sync file selection state between tab group and outline view #1296
Conversation
@austincondiff It won't scroll to the active file or reveal like Xcode. IMO, with regard to having a setting for auto reveal, it will be great so that the user can adjust based on what he prefers. |
@austincondiff Oh my bad, I found a setting for auto reveal preference and it is off by default. It will reveal the file if it is turned on. |
Oh you are right, I guess the work has already been done. In my testing (on
This behavior should be disabled if this setting is off, The selection should be scrolled to when changed and parent folders should be opened to reveal the selection. |
@austincondiff Let me check it on my side |
I got the similar alert message after renaming Screen.Recording.2023-06-04.at.1.52.55.PM.mov |
I updated PR with the following changes:
Screen.Recording.2023-06-10.at.4.10.34.PM.mov |
@dscyrescotti Very nice! Does it scroll to the newly selected item if out of view? |
Yes it does if the reveal setting is on... I forgot to include in recording. Here it is. Screen.Recording.2023-06-11.at.12.02.03.AM.mov |
That is great, but the selected file should probably go to the middle of the scrollview instead of the top or bottom. Try pressing ⌘⇧J in Xcode to see how this works in Xcode. This might be approaching scope-creep though. If you would like, we can merge this and create a separate issue to do this. |
Yes it would be better to tackle them separately as this PR focuses on file sync. So the things left to do are to move the selected file to the middle (only if the setting is on) like VSCode and add ⌘⇧J action to manual reveal like Xcode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Great work!
One thing I noticed as well is it is almost impossible to collapse a folder that contains the active file. When changing tabs, it expands. It should remain collapsed until returning to that tab. |
ce9579b
...dit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorOutlineView.swift
Outdated
Show resolved
Hide resolved
...dit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorOutlineView.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once the changes requested by other maintainers are done!
…w/ProjectNavigatorOutlineView.swift
...dit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorOutlineView.swift
Outdated
Show resolved
Hide resolved
...dit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorOutlineView.swift
Outdated
Show resolved
Hide resolved
…w/ProjectNavigatorOutlineView.swift
…w/ProjectNavigatorOutlineView.swift
@allcontributors add @dscyrescotti for code |
I've put up a pull request to add @dscyrescotti! 🎉 |
Description
This PR includes a bug fix for aligning file selection state on the Project Navigator (outline view) with the current active tab in editor's tab group.
Related Issues
#1294
Checklist
Screenshots
Screen.Recording.2023-06-04.at.9.20.25.AM.mov