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

Scroll top fix @publiclab #6944

Merged
merged 3 commits into from
Jan 3, 2020
Merged

Conversation

Asiedu13
Copy link
Contributor

@Asiedu13 Asiedu13 commented Dec 9, 2019

Fixes #6435 (<=== Add issue number here)
Please review or comment@publiclab
Thanks!

This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls.
This consists of a function that hides the to-top button on the page and reveal it when the user scrolls
scroll-func.js Show resolved Hide resolved
This is the same scroll-func.js file but with the indentations in a more orderly manner.
@Asiedu13 Asiedu13 closed this Dec 10, 2019
@Asiedu13 Asiedu13 reopened this Dec 10, 2019
@IshaGupta18
Copy link
Collaborator

This looks good! @jywarren @SidharthBansal please merge it if you find it okay!

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.

🎉

@cesswairimu
Copy link
Collaborator

Hi all, is the scrollbar ever visible locally? I pulled the changes and could not see it...Thanks all

@anthony-zhou
Copy link
Member

@Asiedu13 Please see my comment on PR #6942 for some tips on integrating this script so that it can be used on the site and seen locally. Thanks!

@SidharthBansal
Copy link
Member

Can we merge this @cesswairimu

@cesswairimu
Copy link
Collaborator

Yes we can

@cesswairimu cesswairimu merged commit 0d54bf3 into publiclab:master Jan 3, 2020
@welcome
Copy link

welcome bot commented Jan 3, 2020

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to PublicLab.org in the next few days, but first it will be published to https://stable.publiclab.org/ (it will take some minutes for this to load, and until then you may see logs from the build process). Please test out your work on this testing server and report back with a comment that all has gone well!
Do join our weekly check-in to share your this week goal and the awesome work you did 😃. Please find the link pinned in the issue section 📝
Now that you've completed this, you can help someone else take their first step!
Reach out to someone else working on theirs on Public Lab's code welcome page. Thanks!

Help others take their first step

Now that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌

https://code.publiclab.org

Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕

People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉

Read about how to help support another newcomer here, or find other ways to offer mutual support here.

@cesswairimu
Copy link
Collaborator

Thanks everyone

@SidharthBansal
Copy link
Member

SidharthBansal commented Jan 4, 2020 via email

Tlazypanda pushed a commit to Tlazypanda/plots2 that referenced this pull request Jan 14, 2020
* Scroll button functionality

This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls.

* public lab scroll-to-top #issue 6435

This consists of a function that hides the to-top button on the page and reveal it when the user scrolls

* indent fixed

This is the same scroll-func.js file but with the indentations in a more orderly manner.
vinitshahdeo pushed a commit to vinitshahdeo/plots2 that referenced this pull request Feb 1, 2020
* Scroll button functionality

This hides the button when the user is at the top of the webpage but reveal the button when the user scrolls.

* public lab scroll-to-top #issue 6435

This consists of a function that hides the to-top button on the page and reveal it when the user scrolls

* indent fixed

This is the same scroll-func.js file but with the indentations in a more orderly manner.
window.addEventListener("scroll", function(){
let position = window.scrollY;
if(position < 200){
scrollBtn.style.opacity = "0";
Copy link
Contributor

Choose a reason for hiding this comment

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

@cesswairimu should not we use "visibility=hidden" instead of "opacity=0" as in this case we still are able to interact with the "scrollBtn"

Copy link
Collaborator

Choose a reason for hiding this comment

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

@frappelatte28 I thought the two are the same...but I am not the best at styling 😆 ...would you like to give it a shot and open a PR with the visibility option, see how it goes?

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.

Remove "scroll to top" arrow key
7 participants