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: now using setQueryParams no longer causes page to jump #3837

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

nickytonline
Copy link
Member

@nickytonline nickytonline commented Aug 2, 2024

Description

Now by default, if you use setQueryParams to added querystring parameters to the URL, the page no longer jumps. If for some reason you need it to scroll to the top, pass in true for scroll.

Related Tickets & Documents

Closes #3836

Mobile & Desktop Screenshots/Recordings

Before

CleanShot 2024-08-02 at 11 33 30

After

CleanShot 2024-08-02 at 11 33 03

Steps to QA

  1. Go to a user profile, e.g. /u/nickytonline
  2. Resize the window so it scrolls down a bit.
  3. Click on one of the tabs, e.g. Recommendations.
  4. The page refreshes and no longer scrolls to the top.

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for design-insights ready!

Name Link
🔨 Latest commit e2c3627
🔍 Latest deploy log https://app.netlify.com/sites/design-insights/deploys/66ad10a98db6e5000855833d
😎 Deploy Preview https://deploy-preview-3837--design-insights.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.

Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for oss-insights ready!

Name Link
🔨 Latest commit e2c3627
🔍 Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/66ad10a98db6e50008558341
😎 Deploy Preview https://deploy-preview-3837--oss-insights.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.

@nickytonline nickytonline requested a review from a team August 2, 2024 15:46
Copy link
Contributor

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

@nickytonline nickytonline merged commit 6541971 into beta Aug 2, 2024
13 checks passed
@nickytonline nickytonline deleted the nickytonline/no-scroll-set-querystring branch August 2, 2024 17:05
open-sauced bot pushed a commit that referenced this pull request Aug 2, 2024
## [2.50.0-beta.5](v2.50.0-beta.4...v2.50.0-beta.5) (2024-08-02)

### 🐛 Bug Fixes

* now using setQueryParams no longer causes page to jump ([#3837](#3837)) ([6541971](6541971))
open-sauced bot pushed a commit that referenced this pull request Aug 6, 2024
## [2.50.0](v2.49.0...v2.50.0) (2024-08-06)

### 🍕 Features

* 'Coming Soon' state for OSSF Scorecard ([#3840](#3840)) ([a36205a](a36205a))
* add option to import a SBOM of repositories to a workspace ([#3838](#3838)) ([ce6b783](ce6b783))
* added a skip link ([#3850](#3850)) ([83b335a](83b335a))
* converted contributor insight contributor table to new table component ([#3843](#3843)) ([c91211c](c91211c))
* OSCR works with API range 0-300 and uses ceiling math ([#3829](#3829)) ([23ae445](23ae445))

### 🐛 Bug Fixes

* **/app/pages/_document.tsx:** add lang attribute to html tag ([#3851](#3851)) ([d98bc0a](d98bc0a))
* now tooltip appears over lock button ([#3832](#3832)) ([b3274cb](b3274cb))
* now using setQueryParams no longer causes page to jump ([#3837](#3837)) ([6541971](6541971))
* OSCR math ceiling for contributor card ([#3839](#3839)) ([fc9b3e9](fc9b3e9))
* put back original heading for PR velocity ([#3830](#3830)) ([e8acd50](e8acd50))
* remove gradient from metadata tags ([#3856](#3856)) ([b446fc7](b446fc7))
* removed some unused code ([#3849](#3849)) ([70be5b9](70be5b9))
* removed unused code ([#3827](#3827)) ([3d28f2c](3d28f2c))
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.

Bug: Setting values via setQueryParams causes page to jump
3 participants