Skip to content

chore: move scroll restoration and focus reset out of client.js - #16980

Merged
teemingc merged 2 commits into
version-3from
client-focus-module
Sep 8, 2026
Merged

chore: move scroll restoration and focus reset out of client.js#16980
teemingc merged 2 commits into
version-3from
client-focus-module

Conversation

@Nic-Polumeyv

@Nic-Polumeyv Nic-Polumeyv commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Scroll restoration and focus reset live in client.js but read none of its state. This moves them, unchanged, into their own module, the shape snapshots.js took in #16685.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 31, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from fad9a52:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/fad9a52484d020561a244623fb4e9000646e0eef

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16980

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fad9a52

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: QUIET

Plan: Advanced

Run ID: 32194805-3f84-4a0e-9b4c-9224a9e659a8

📥 Commits

Reviewing files that changed from the base of the PR and between 01f7ffb and fad9a52.

📒 Files selected for processing (1)
  • packages/kit/src/runtime/client/client.js
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • sveltejs/vite-plugin-svelte (manual)
  • vitejs/vite (manual)
  • sveltejs/svelte (manual)

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Focus, hash lookup, and scroll management move from client.js into dedicated runtime modules. Client navigation imports the new helpers. Vitest coverage validates focus restoration, hash navigation, scroll restoration, and one-navigation scroll suppression.

Merge Risk: ⚪ Minimal · up to fad9a

Client focus and scroll behavior has been reorganized into dedicated runtime helpers while preserving navigation behavior, with coverage for the affected restoration and suppression paths. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required chore: prefix and accurately describes moving scroll restoration and focus reset out of client.js.
Backward Compatibility Impact Disclosure ✅ Passed No breaking public interface change is introduced. The PR changes only runtime client modules and tests. The package export map is unchanged, all existing named exports from client.js remain, and `u…

Comment @coderabbitai help to get the list of available commands.

@Nic-Polumeyv
Nic-Polumeyv marked this pull request as ready for review September 1, 2026 19:57
@teemingc
teemingc force-pushed the client-focus-module branch from 01f7ffb to fad9a52 Compare September 7, 2026 05:38
@teemingc
teemingc merged commit 38c90bf into version-3 Sep 8, 2026
41 checks passed
@teemingc
teemingc deleted the client-focus-module branch September 8, 2026 11:58
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.

2 participants