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

Add Open Dock shortcuts #90226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Apr 4, 2024

Allows the user to bind a shortcut to open and focus on the side docks.
Didn't set any defaults, but I can if wanted.
The tab of the dock will be selected, you can use ui_focus_next (Tab) to go to other focusable parts of the dock that you want.
Available as commands in the command palette.

Also updated the EditorPlugin add_control_to_dock documentation and removed the part about bottom panel since users can not use this to make docks that can go to the bottom panel (Unless I'm missing something?).

image

The Filesystem shortcut already exists under Bottom Panels.

@kitbdev kitbdev requested a review from a team as a code owner April 4, 2024 22:00
@AThousandShips AThousandShips added this to the 4.x milestone Apr 5, 2024
@Calinou
Copy link
Member

Calinou commented Oct 17, 2024

@kitbdev Could you look into rebasing and resolving merge conflicts so I can review this?

@kitbdev kitbdev requested a review from a team as a code owner October 17, 2024 14:30
@kitbdev
Copy link
Contributor Author

kitbdev commented Oct 17, 2024

Rebased and fixed merge conflicts.

@@ -907,7 +907,7 @@ void VersionControlEditorPlugin::fetch_available_vcs_plugin_names() {
}

void VersionControlEditorPlugin::register_editor() {
EditorDockManager::get_singleton()->add_dock(version_commit_dock, "", EditorDockManager::DOCK_SLOT_RIGHT_UL);
EditorDockManager::get_singleton()->add_dock(version_commit_dock, "", EditorDockManager::DOCK_SLOT_RIGHT_UL, ED_SHORTCUT_AND_COMMAND("docks/open_version_control", TTR("Open Version Control Dock")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shortcut does not appear anywhere, I assume unless you have VCS plugin installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the VCS plugin is needed for this to show, just like the toggle_version_control_bottom_panel shortcut below.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 19, 2024

I noticed FileSystem Dock already has a shortcut, but its named differently. Should we make it consistent? 🤔

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine.

@kitbdev
Copy link
Contributor Author

kitbdev commented Oct 19, 2024

We probably should change the Filesystem one to match the other docks, but then the shortcut name won't match when it is at the Bottom Panel. I'm not sure how to fix it besides having 2 separate shortcuts.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 19, 2024

IMO FileSystem dock is still a "dock" even if it's at the bottom. Side dock is its default state.

@kitbdev
Copy link
Contributor Author

kitbdev commented Oct 19, 2024

Changed it to be with the other docks.
If a custom shortcut was set before, it will be reset since the path is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Keyboard navigation by creating shortcuts to focus parts of the UI
4 participants