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

Added Scroll to top feature #1244

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

sagarhedaoo
Copy link
Contributor

✨ 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.

Screen Recording 2024-05-30 at 2 56 04 AM

@CLAassistant
Copy link

CLAassistant commented May 30, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@manojVivek manojVivek left a 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;
Copy link
Collaborator

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?

Copy link
Collaborator

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.

@manojVivek manojVivek merged commit 154f6ca into responsively-org:main Jun 7, 2024
3 checks passed
@manojVivek
Copy link
Collaborator

@sagarhedaoo Thanks again for your effort on this! ❤️

@manojVivek
Copy link
Collaborator

@all-contributors Please add @sagarhedaoo for code.

Copy link
Contributor

@manojVivek

I've put up a pull request to add @sagarhedaoo! 🎉

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.

Add "ScrollToTop" Button for User Enhancement
3 participants