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

fixing bug #134

Merged
merged 1 commit into from
Jun 29, 2020
Merged

fixing bug #134

merged 1 commit into from
Jun 29, 2020

Conversation

choldgraf
Copy link
Member

@choldgraf choldgraf commented Jun 29, 2020

I believe this resolves #130

It does the following:

  • Removes the vendored bootstrap and jquery since we get it from the theme now
  • Makes the content-repo form field optional for the non-binder tabs

try it here: https://119-92329878-gh.circle-artifacts.com/0/html/link.html

app.add_javascript("link_gen/link.js")
app.add_javascript("link_gen/vendor/bootstrap-4.1.3/js/bootstrap.bundle.min.js")
Copy link
Member

Choose a reason for hiding this comment

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

Is it safe to delete these files from the link_gen/vendor/ folder? https://github.com/jupyterhub/nbgitpuller/tree/master/docs/_static/link_gen/vendor

@choldgraf
Copy link
Member Author

good point - just removed those files (and also an extra "onFormChange" call that I think is outdated

Copy link
Member

@GeorgianaElena GeorgianaElena left a comment

Choose a reason for hiding this comment

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

I tested this too and it looks like the link gets generated for JupyterHub and Canvas with this change even when content-repo is not provided and the onFormChange error doesn't appear anymore in console 🎉

This also happens though:
nbgitpuller-bug
It needs input to generate the link when switching tabs from JupyterHub to Canvas. Maybe we can call the displaylink on tab changes too?

Also, sorry for introducing this bug 😢

@manics
Copy link
Member

manics commented Jun 29, 2020

Does anyone have experience with writing JavaScript tests? It might be a good addition for a future PR. Although this is a relatively simple JS app the tests could also serve as a good tutorial for inexperienced Javascript testers.

@choldgraf
Copy link
Member Author

@GeorgianaElena I kinda think it's OK to ask users to take another action when they switch tabs. My guess is that the large majority of users will do:

  1. Land on page
  2. Click tab they want
  3. Copy/paste

This is more likely now that the tabs can be activated with a REST url too. So while we can definitely improve this behavior, I don't know that it needs to block this PR (since this PR fixes a more prominent bug). What do you think?

@manics I have intentionally avoided learning how to write javascript tests because I want to keep a plausible reason to never write them :-)

@GeorgianaElena
Copy link
Member

It makes sense, @choldgraf. Thanks for explaining.

This looks LGTM then 🚀

@choldgraf
Copy link
Member Author

choldgraf commented Jun 29, 2020

@manics are you OK with me merging this? (or do you wanna merge?) I don't wanna jump-start it since you've commented on the PR :-)

Copy link
Member

@manics manics left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@choldgraf choldgraf merged commit bbec3c6 into jupyterhub:master Jun 29, 2020
@choldgraf choldgraf deleted the bug branch June 29, 2020 21:26
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.

javascript error in https://jupyterhub.github.io/nbgitpuller/link.html
3 participants