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

Tooltip not show on commit button when it is disabled #1035

Closed
andrewhli opened this issue Sep 14, 2021 · 7 comments
Closed

Tooltip not show on commit button when it is disabled #1035

andrewhli opened this issue Sep 14, 2021 · 7 comments
Labels

Comments

@andrewhli
Copy link

andrewhli commented Sep 14, 2021

Hi,

Here are my steps so far:

  1. Created private GitHub SSH key in ~/.ssh (e.g. ~/.ssh/id_x)
  2. Cloned remote GitHub repo via Jupyterlab Git UI (sidebar), using the SSH URL (e.g. [email protected]:user/repo.git)
  3. Edited the readme in the repo via Jupyterlab
  4. Tried to commit, but the option is greyed out. There are console warnings but no errors.
  5. Updated - according to krassowski: files need to be added to "Staged" to enable commits. "Maybe there should be a tooltip showing up when hovering over the greyed out "Commit" button saying "Add at least one file to the staging area to commit"?"

Screen Shot 2021-09-14 at 12 22 46 PM

Would appreciate any help on this. Thanks!

@andrewhli andrewhli added the bug label Sep 14, 2021
@welcome
Copy link

welcome bot commented Sep 14, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Member

krassowski commented Sep 14, 2021

Welcome! You need to add a file to the staging area so that the extension knows which file is supposed to be committed. You can do this by hovering over the entries on the "Changed" or "Untracked" list (depending on what you would like to add) which should make a plus (+) icon appear - click on it to add a file and you will be able to commit. Alternatively, use context menu in the file browser (Git submenu).

@andrewhli
Copy link
Author

Thanks! Adding the files to "Staged" worked perfectly. Any interest to adding this step to the jupyterlab-git Readme? I've been so used to using GitHub desktop, where it only shows the changes and skips over the "Staged" step (not visible to users like me), so I didn't know this was a required step in jupyterlab-git

@krassowski
Copy link
Member

You may like the simpleStaging option (see https://github.com/jupyterlab/jupyterlab-git#ui-settings). This step is not surprising to most Git users, but I see how the GUI is not helping currently.

Maybe there should be a tooltip showing up when hovering over the greyed out "Commit" button saying "Add at least one file to the staging area to commit"?

@andrewhli
Copy link
Author

The tooltip makes sense. I'll change this into a feature request and rename the title

@andrewhli andrewhli changed the title Unable to commit (button is greyed out) Tooltip over greyed out "Commit" button saying "Add at least one file to the staging area to commit" Sep 14, 2021
@andrewhli andrewhli changed the title Tooltip over greyed out "Commit" button saying "Add at least one file to the staging area to commit" Feature request: Tooltip over greyed out "Commit" button saying "Add at least one file to the staging area to commit" Sep 14, 2021
@fcollonval
Copy link
Member

Just a note when tackling this:

  • An appropriated title is already set to the button
  • It is not displayed due to the style pointer-events: none; set by material-ui:

image

@andrewhli would like to make a PR to correct this one?

You need to add:

pointer-events: auto !important;

in the css rules:

export const disabledStyle = style({

@fcollonval fcollonval changed the title Feature request: Tooltip over greyed out "Commit" button saying "Add at least one file to the staging area to commit" Tooltip not show on commit button when it is disabled Sep 15, 2021
fcollonval added a commit that referenced this issue Sep 16, 2021
* Fix pointer on CommitBox not displaying

PR request based on @fcollonval's suggestion from this thread: #1035 (comment)

* Update src/style/CommitBox.ts

Co-authored-by: Frédéric Collonval <[email protected]>

Co-authored-by: Frédéric Collonval <[email protected]>
@fcollonval
Copy link
Member

Fixed by #1036

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

No branches or pull requests

3 participants