-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added Scroll to top feature #1244
Added Scroll to top feature #1244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagarhedaoo Thank you so much for this contribution, just a minor change request. Looks great otherwise!
@@ -495,6 +495,61 @@ const Device = ({ isPrimary, device, setIndividualDevice }: Props) => { | |||
const scaledHeight = height * zoomfactor; | |||
const scaledWidth = width * zoomfactor; | |||
|
|||
useEffect(() => { | |||
const webview = ref.current; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say, we don't need this button inside the view. We don't want to pollute the user space with the app code.
The icon in the toolbar is good enough and this just feels like a redundant cta. Can you please remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a stab at it myself.
@sagarhedaoo Thanks again for your effort on this! ❤️ |
@all-contributors Please add @sagarhedaoo for code. |
I've put up a pull request to add @sagarhedaoo! 🎉 |
✨ Pull Request
📓 Referenced Issue
Link: #1234
Fixes: #1234
ℹ️ About the PR
I implemented the Scroll to top feature in the webview as well as in the toolbar. The Button disappears when the user is at the top of the page and when user goes down then it appears.
Upon clicking it scrolls back to the top.
Same for the toolbar button that I added/
🖼️ Testing Scenarios / Screenshots
I used command yarn test to test the code before pushing it with all the test cases passed.