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

Access Token Popup (GCI) #4021

Merged
merged 11 commits into from Nov 26, 2018
Merged

Access Token Popup (GCI) #4021

merged 11 commits into from Nov 26, 2018

Conversation

harshkhandeparkar
Copy link
Member

@harshkhandeparkar harshkhandeparkar commented Nov 21, 2018

Fixes #3586

plots2-token-popup

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

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

PR for GCI task.

@plotsbot
Copy link
Collaborator

plotsbot commented Nov 21, 2018

2 Messages
📖 @harshkhandeparkar 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.
📖 This pull request doesn’t link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: Fixes #123.

Generated by 🚫 Danger

@jywarren
Copy link
Member

Hi, do you think you could put the key sections of this into a partial, named something like _token.html.erb and include it in here with <%= render partial: 'users/token' %> ? That'll help the profile template not get too overwhelmed! You can see other examples of partials throughout the templates if that helps!

Thanks!!

@jywarren
Copy link
Member

And great work!!!

@harshkhandeparkar
Copy link
Member Author

Hi, do you think you could put the key sections of this into a partial, named something like _token.html.erb and include it in here with <%= render partial: 'users/token' %> ? That'll help the profile template not get too overwhelmed! You can see other examples of partials throughout the templates if that helps!

Thanks!!

I have done so.

@harshkhandeparkar
Copy link
Member Author

@publiclab/reviewers please review and approve my task.

@harshkhandeparkar
Copy link
Member Author

Added new functionality:
Clicking the area surrounding the popup closes the popup.

$('#token-mask').on('click', closePopup);

function closePopup(e){
var tokenPopup = document.querySelector('#token-popup .modal-content');
if (tokenPopup === e.target || tokenPopup.contains(e.target) && e.target.id !== 'close-btn'){
return;
};
$('#token-popup .modal-content').animate({marginTop: '0', opacity: '0'}, 300, function(){
$(this).remove();
$('#token-mask').fadeOut(200, function(){
$(this).remove();
});
});
};

gci-popup-click-mask

@harshkhandeparkar
Copy link
Member Author

@publiclab/reviewers please review.

@avsingh999
Copy link
Member

avsingh999 commented Nov 23, 2018

great work @harshkhandeparkar 👍
@SidharthBansal @jywarren it looks good to me 😄 , I think ready to merge
thank you

@harshkhandeparkar
Copy link
Member Author

Thanks for reviewing promptly.

Copy link
Member

@grvsachdeva grvsachdeva left a comment

Choose a reason for hiding this comment

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

Awesome work 🎉

@jywarren jywarren merged commit 58d5ea8 into publiclab:master Nov 26, 2018
@ghost ghost removed the ready label Nov 26, 2018
@jywarren
Copy link
Member

Fantastic. 👍 👍 🎉

@harshkhandeparkar harshkhandeparkar deleted the access-token-popup branch November 27, 2018 17:43
jonxuxu pushed a commit to jonxuxu/plots2 that referenced this pull request Dec 2, 2018
* added popup

* added close button function

* added copy button

* code cleanup

* copy function change

* cleanup

* added partial file

* added click event listener to mask (closes popup)

* removed redundant event listener

* cleaned up code and made some tweaks
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this pull request May 5, 2019
* added popup

* added close button function

* added copy button

* code cleanup

* copy function change

* cleanup

* added partial file

* added click event listener to mask (closes popup)

* removed redundant event listener

* cleaned up code and made some tweaks
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

5 participants