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 submodules display #1374

Merged
merged 16 commits into from
Nov 6, 2024
Merged

Add submodules display #1374

merged 16 commits into from
Nov 6, 2024

Conversation

gjmooney
Copy link
Contributor

Addresses #1355.

Adds a display for submodules in the current repo inspired by the branch menu. Currently this just displays the submodules that are present and doesn't have any functionality. I figure how to handle the submodules and which functionality should be exposed should be discussed first.

Repo with no submodules:
no_subs

Repo with submodules - collapsed:
subs-collapse

Repo with submodules - expanded:
subs

Copy link

Binder 👈 Launch a Binder on branch gjmooney/jupyterlab-git/submodules

@jtpio jtpio added this to the 0.51.0 milestone Oct 31, 2024
jupyterlab_git/git.py Outdated Show resolved Hide resolved
@jtpio
Copy link
Member

jtpio commented Nov 4, 2024

how to handle the submodules and which functionality should be exposed should be discussed first.

Yes that makes sense 👍 This would probably require integrating other submodule commands such as git submodule init and git submodule update.

@@ -1069,6 +1069,24 @@ async def post(self, path: str = ""):
self.finish(json.dumps(response))


class GitSubModulesHandler(GitHandler):
Copy link
Member

Choose a reason for hiding this comment

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

Minor nitpick: should SubModule be spelled Submodule instead?

Looks like this is what the git docs use: https://git-scm.com/book/en/v2/Git-Tools-Submodules

Wondering about this, if we start exposing classes and other interfaces which include the word "submodule" in their name.

Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtpio jtpio merged commit 6b62f1f into jupyterlab:main Nov 6, 2024
8 checks passed
@gjmooney gjmooney deleted the submodules branch November 6, 2024 13:49
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.

2 participants