-
-
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
feat: creates file/directory in active path #1416
feat: creates file/directory in active path #1416
Conversation
The TODO comment is in the ProjectNavigator. You're accessing the TabBar to get the required data. While I believe that this does work, but it's not the correct way. We shouldn't want to mix those domains when not necessary. The ProjectNavigator should have a current selected file as well, so that should be accessed. As the ProjectNavigatorBottomBar is part of thé ProjectNavigator. |
Makes sense! Will review! |
Addressing the comment left in Discord: This is very close, instead of using the workspace document, use the editor manager directly via the following in @EnvironmentObject var editorManager: EditorManager You can use the editor manager to get the active editor pane, and then the selected tab from that. See the That should get rid of the need to add methods to |
Great! Thanks so much! |
babe0d1
to
1d83e83
Compare
Hi @thecoolwinter I just applied suggestions! Also added a recording for demo. Repo in demo is public available here: https://github.com/whizzes/playa |
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.
Awesome! Looks good to me
@EstebanBorai Could we highlight the text after the untitled file/folder is created so the user can simply type their desired name for it? |
CodeEdit/Features/NavigatorArea/ProjectNavigator/ProjectNavigatorToolbarBottom.swift
Outdated
Show resolved
Hide resolved
CodeEdit/Features/NavigatorArea/ProjectNavigator/ProjectNavigatorToolbarBottom.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.
LGTM!
@matthijseikelenboom can we get a review here |
@allcontributors add @EstebanBorai for code |
I've put up a pull request to add @EstebanBorai! 🎉 |
Description
Uses
EditorManager
to retrieve active directory and create Files/Directories in thecurrent active directory.
Related Issues
I found the todos in the source code while reading.
I wanted to address the related issue but didn't found one.
Here is the TODO comment: https://github.com/CodeEditApp/CodeEdit/blob/main/CodeEdit/Features/NavigatorSidebar/ProjectNavigator/ProjectNavigatorToolbarBottom.swift#L59
N/A
Checklist
Screenshots
Screen.Recording.2023-09-12.at.8.05.30.PM.mov