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

Identity feature #366

Merged
merged 6 commits into from
Jul 30, 2019
Merged

Identity feature #366

merged 6 commits into from
Jul 30, 2019

Conversation

fcollonval
Copy link
Member

Fixes #351 and will imply simplification in #345.

User changes

If the user has no user.name and no user.email defined in Git global configuration, the GitPanel will be replaced by a warning and a button prompting the user for a name and an email.

image

If the user provides them, they will be added as global configuration options in git. Then the extension will behave as previously.

Note;

  • The email is not verified to be a valid email string
  • If the user removes his identity after opening JupyterLab (very unlikely), the extension is never checking again if an identity is set.

Backward incompatibilities

None

@jaipreet-s
Copy link
Member

Thanks for this. Based on a quick look, this will disable all of the Git panel functionality and replace it with this error message if theres no identity set. Now, the username/email is not required till the user starts to commit the information, so disabling the "changed/staged" view, and history view, and the upcoming diff functionality seems heavy for not having a username/email set.

My suggestion would be would be to delay this check till the user goes to commit the the information

@fcollonval
Copy link
Member Author

Thanks for the feedback @jaipreet-s.

Indeed the current approach is disabling the main panel. I'll update it following your suggestion to check once and only once at the first commit attempt.
Does that sounds better?

@jaipreet-s
Copy link
Member

That sounds great! I'll also engage @weihwang to have a look at the username/email popup wording/UX.

jupyterlab_git/git.py Outdated Show resolved Hide resolved
jupyterlab_git/git.py Outdated Show resolved Hide resolved
jupyterlab_git/git.py Outdated Show resolved Hide resolved
@fcollonval
Copy link
Member Author

@jaipreet-s does it look better?

@mathematicalmichael
Copy link
Contributor

This is a great idea!
Am I right in interpreting that it first checks for local user info, then global, if missing?
Then sets local if so.

Do these changes to .git/config migrate upon push?

@jaipreet-s
Copy link
Member

@fcollonval This looks great.

Looks like there is one merge conflict and an unrelated Travis CI failure though

@fcollonval
Copy link
Member Author

@jaipreet-s I finally overcome the CI error. Could you please have a look?

@jaipreet-s jaipreet-s merged commit 5e6c871 into jupyterlab:master Jul 30, 2019
@ktaletsk ktaletsk mentioned this pull request Aug 9, 2019
@fcollonval fcollonval deleted the fix-author branch October 16, 2019 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI to configure name and email settings for local user?
3 participants