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

Drag and drop for git interactive rebase doesn't work #682

Closed
zahitz opened this issue Apr 22, 2020 · 15 comments · Fixed by #683
Closed

Drag and drop for git interactive rebase doesn't work #682

zahitz opened this issue Apr 22, 2020 · 15 comments · Fixed by #683

Comments

@zahitz
Copy link

zahitz commented Apr 22, 2020

Hi,
When trying to change the order of commits when doing for example git rebase -i HEAD~4 (as in level Moving Work Around:2) nothing happens. Tried this in different browsers (chrome, firefox, Internet explorer) on linux and windows pcs.
And thanks for this wonderful site btw

@Kshitij09
Copy link

Same with me

@Werseter
Copy link

21 hours ago #681 was merged which bumped jQuery from 1.8.0 to 3.4.0 but from 1.9 $.browser endpoint was removed (was deprecated since 1.3) - docs: https://api.jquery.com/jQuery.browser/

That's probably what broke it

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

Screen Shot 2020-04-22 at 11 35 20 AM

hrm I downgraded the version but I'm still getting errors now :/

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

oh we need to specify even lower, justasec

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

hrm, I think this was broken actually before #681 . it seems related to #680

I am reverting the prod version temporarily:

remote: GitHub found 4 vulnerabilities on pcottle/learnGitBranching's default branch (1 critical, 3 moderate). To find out more, visit:
remote:      https://github.com/pcottle/learnGitBranching/network/alerts
remote: 
To github.com:pcottle/learnGitBranching.git
 + 38c7320...ec6f612 gh-pages -> gh-pages (forced update)

wait, somehow this messed up the gh-pages hosting:
https://learngitbranching.js.org/?demo

🤦🏼‍♂️
so it it'll work in prod as we figure this out

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

oh somehow we dropped index.html, justasec

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

Gah, still broken. few notes for myself:

  • the .gitignore is actually different depending on if we're on gh-pages or the master branch. this is a good thing to clean up eventually so we don't have issues like this (where we dropped the index and build assets on the gh-pages branch)
  • for some reason the build files werent resolving, so I had to inline their absolute URIs. but now they are getting blocked due to cross origin

I have a few meetings, will check in later

@pcottle
Copy link
Owner

pcottle commented Apr 22, 2020

Alright! I reverted prod gh-pages back to a version that works, phew 🥵. Drag and drop in the rebase view should be fully functional.

@hong4rc I think the issue we need to resolve is that although we are "depending" on jquery 3.4.1 in yarn.lock before #680, we're actually running 1.8.0 in the browser. So when you made the changes to index.html and we started running on the correct version in our dependencies, the drag and drop functionality broke.

ideally I'd love to just upgrade the drag and drop functionality to a modern version rather than have this old dependency... anyways I have to get back to my real work for today, so I'll try looking at this later. for now, we can't really push prod against master :(

@pcottle pcottle closed this as completed Apr 22, 2020
@hong4rc
Copy link
Contributor

hong4rc commented Apr 23, 2020

hrm I downgraded the version but I'm still getting errors now :/

Can you give me reproduce this error?

@hong4rc
Copy link
Contributor

hong4rc commented Apr 23, 2020

I think the problem is jquery-ui. I use jquery-ui 1.12 for jquery 3.5 => don't see error about find(...).andSelf (not sure other errors)

I try use

require('jquery-ui/ui/widget');
require('jquery-ui/ui/widgets/mouse');
require('jquery-ui/ui/plugin');
require('jquery-ui/ui/widgets/draggable');
require('jquery-ui/ui/widgets/sortable');

We can build it to lib file to avoid rebuild lib(without change)

@pcottle
Copy link
Owner

pcottle commented Apr 23, 2020

ah yeah, I found this example as well:
https://bugs.jqueryui.com/ticket/15020

I think thats what was confusing me -- we have to explicitly require it in rebase view to make it work now :P

@pcottle
Copy link
Owner

pcottle commented Apr 23, 2020

derp, I merged the wrong PR >___< justasec

@pcottle
Copy link
Owner

pcottle commented Apr 23, 2020

Ok everyone! After a hard refresh, the latest version of prod has this all working:
https://learngitbranching.js.org/?NODEMO&command=gc;gc;gc;git%20rebase%20-i%20HEAD~3

Let me know if you spot any other issues but we should be all fixed up here 😇security vulnerabilities fixed AND jquery UI integrated in a more modern way in our build infra

@hong4rc
Copy link
Contributor

hong4rc commented Apr 23, 2020

ah yeah, I found this example as well:
https://bugs.jqueryui.com/ticket/15020

I think thats what was confusing me -- we have to explicitly require it in rebase view to make it work now :P

You forgot draggable

Open https://learngitbranching.js.org/ and click next until type any command :)

image

We need to add this:

require('jquery-ui/ui/plugin');
require('jquery-ui/ui/safe-active-element');
require('jquery-ui/ui/safe-blur');
require('jquery-ui/ui/widgets/draggable');

I can't test now, so can you help me test it?

Thanks

@pcottle
Copy link
Owner

pcottle commented Apr 25, 2020

Ah my bad! Let me try to update

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 a pull request may close this issue.

5 participants