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

fix: Fixed auto scroll not working when configure provider button is … #5282

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

AdityaGos
Copy link

Fixes #5151

What change does this PR introduce?

This PR fixes auto scroll not working when we click on the configure providers button in Get Started Page

Why was this change needed?

Introduced a setTimeout to trigger the auto scroller correctly inside useEffect . Removed unnecessary element from dependency array of the useEffect.

Copy link

netlify bot commented Mar 8, 2024

👷 Deploy request for dev-web-novu pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 16c4bb9

setTimeout(() => {
onTabChange(scrollTo?.toString());
}, 100);
}, []);
Copy link
Contributor

Choose a reason for hiding this comment

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

there will be an ESLint warning about missing deps, please fix it

Copy link
Author

Choose a reason for hiding this comment

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

Sure @LetItRock ,Just added the dependency . Was just curios about why we are putting onTabChange function as deps , we are scrolling once we land to the page .After that any tab changes , the onTabChange function will trigger the scrolling .

Copy link
Contributor

Choose a reason for hiding this comment

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

it's safe to put the onTabChange here in the deps array, because it's memoized and won't change during the re-renders ;)

Copy link
Author

Choose a reason for hiding this comment

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

Got it 👍

@github-actions github-actions bot added the stale Pull Request that needs to be reviewed label Apr 1, 2024
@AdityaGos AdityaGos requested a review from a team as a code owner April 30, 2024 09:08
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for novu-design ready!

Name Link
🔨 Latest commit 16c4bb9
🔍 Latest deploy log https://app.netlify.com/sites/novu-design/deploys/6630b513e7b6f90008c4b9e8
😎 Deploy Preview https://deploy-preview-5282--novu-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community @novu/web stale Pull Request that needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Auto scroll to provider
2 participants