Skip to content

feat: Support the use of regular HTML anchor elements for hash routing universes - #51

Merged
webJose merged 2 commits into
mainfrom
JP/anchors
Sep 7, 2025
Merged

feat: Support the use of regular HTML anchor elements for hash routing universes#51
webJose merged 2 commits into
mainfrom
JP/anchors

Conversation

@webJose

@webJose webJose commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@webJose
webJose requested a review from Copilot September 7, 2025 04:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances hash routing functionality by adding support for regular HTML anchor elements. The changes ensure that when users navigate via standard anchor tags (which don't preserve history state), the current state is maintained instead of being lost.

  • Adds detection for potential anchor tag navigation when history state is null
  • Preserves existing state during hash navigation via anchor elements
  • Updates state assignment to use fallback logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/lib/core/LocationLite.svelte.ts
Comment thread src/lib/core/LocationLite.svelte.ts
@webJose
webJose merged commit db8eb4f into main Sep 7, 2025
1 check passed
@webJose
webJose deleted the JP/anchors branch September 7, 2025 04:17
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