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

Post your work #4240

Merged
merged 26 commits into from
Jan 4, 2019
Merged

Post your work #4240

merged 26 commits into from
Jan 4, 2019

Conversation

jonxuxu
Copy link
Member

@jonxuxu jonxuxu commented Dec 10, 2018

Fixes #4194

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/reviewers for help, in a comment below

When the user clicks Post your work under the Get Involved tab, a login modal pops up if the user is not logged in.
Gif demo:
ezgif com-video-to-gif

I can't demo logging in on the modal because I'm on cloud 9 and the localhost redirect link won't work. But here you can see that when login is completed, the user gets automatically routed to /post .

@plotsbot
Copy link
Collaborator

plotsbot commented Dec 10, 2018

1 Warning
⚠️ It looks like you merged from master in this pull request. Please rebase to get rid of the merge commits – you may want to rewind the master branch and rebase instead of merging in from master, which can cause problems when accepting new code!
2 Messages
📖 @JonathanXu1 Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 It looks like you haven’t marked all the checkboxes. Help us review and accept your suggested changes by going through the steps one by one. If it is still a ‘Work in progresss’, please include ‘[WIP]’ in the title.

Generated by 🚫 Danger

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018

Fix seems to be correct. But there is some problem on cloud9. I think you can take this task. I will approve it.
Please submit for review on the GCI dashboard

Copy link
Member

@SidharthBansal SidharthBansal left a comment

Choose a reason for hiding this comment

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

Hi, changes looks good to me. Thanks for your work.
@gauravano can you please review this and merge this?

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

Thanks. Can I get a link to the task name?
image

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018 via email

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

image

@SidharthBansal
Copy link
Member

https://codein.withgoogle.com/dashboard/tasks/5382165610102784/

@kevinzluo
Copy link
Collaborator

kevinzluo commented Dec 10, 2018

@SidharthBansal @JonathanXu1 I was wondering how you managed to get the page to redirect to Post and tried it on my own computer, but it didn't redirect me to Post. I think it does in your gif because the last request was to the Post page.

I think you might need to create an AJAX request like I did in #4239 (the getJSON request`) or modify the return_to.

showactuallynotworking

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018 via email

@kevinzluo
Copy link
Collaborator

@SidharthBansal I was stating that this PR was not redirecting, not my own. Sorry for the confusion.

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

@kevinzluo hmm thanks for pointing it out. I'm looking into it.

@SidharthBansal SidharthBansal added this to the OAuth milestone Dec 10, 2018
Copy link
Member

@SidharthBansal SidharthBansal left a comment

Choose a reason for hiding this comment

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

@JonathanXu1 please provide screenshot for the localhost:3000
The above screenshot is not clear. Also please solve above query asked by @kevinzluo

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

@SidharthBansal You can click on the gif for a better quality rendering. Do you need another screenshot for something else? I'm using c9 by the way
@kevinzluo is this the line that changes the url and loads the page to a specific link?

anchor.on('click', function() {
      $.getJSON(href);
    });

@SidharthBansal
Copy link
Member

@JonathanXu1 can you provide another gif for the behaviour at the localhost?

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

@SidharthBansal this is what happens when I login with the modal:
ezgif com-video-to-gif
Not sure why it works when I login through the login page..

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 10, 2018 via email

@grvsachdeva
Copy link
Member

@JonathanXu1 see the URL carefully. You are trying to login to localhost from cloud9, it will give error as server is not running at localhost. Makes sense?

@kevinzluo
Copy link
Collaborator

Yep that is the line @JonathanXu1 . Sorry for the late reply.

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 10, 2018

@gauravano I think it has to do with the routing of the login, which would be unnoticeable when testing on localhost. Not sure where to look to fix this issue though..

@grvsachdeva
Copy link
Member

Change login route for posting screenshot.

@SidharthBansal
Copy link
Member

@JonathanXu1 can you please make your branch consistent with the current master and try out it again.
There might be some deletions and some additions in this pr too. Please send the changes whenever you get time.

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 19, 2018

Sorry I was working on uni apps. I'm able to look at it now.

I verified that clicking the "post your work button" allows the login modal to show. However, when I login, I cannot verify that the redirect works because the cloud 9 server still redirects to the localhost link.

@kevinzluo
Copy link
Collaborator

@JonathanXu1
Try out the changes from #4334 but no need to commit them.

@SidharthBansal
Copy link
Member

@JonathanXu1 how is it going ?

@SidharthBansal
Copy link
Member

I cannot verify that the redirect works because the cloud 9 server still redirects to the localhost link.

We have solved this issue. You can try again.
Thanks

@SidharthBansal
Copy link
Member

@kevinzluo this looks good to me. Can you also review it once? So that I can merge it.
Thanks @JonathanXu1 for the amazing work you are doing at PL.

@jonxuxu
Copy link
Member Author

jonxuxu commented Dec 27, 2018

@SidharthBansal on cloud 9 it is still reloading to localhost. I'm currently installing plots2 on Ubuntu on Windows on another computer. I'll let you know how it goes. Thanks for your patience.

@oorjitchowdhary
Copy link
Member

Hi all, after the updates on requireLogin, I think this will work now...
@JonathanXu1 Can you please test out the behaviour?
Thanks

@SidharthBansal
Copy link
Member

@jywarren tested it on local host so merging it up.
Thanks all

@SidharthBansal SidharthBansal merged commit fb07393 into publiclab:master Jan 4, 2019
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this pull request May 5, 2019
* made field required

* fix merge conflict

* delete comment moderate file

* post your work link loads modal if user not logged in

* trying out kevin's changes

* post your work link loads modal if user not logged in

* trying out kevin's changes

* made login popup from post your work link
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.

None yet

6 participants