Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Aug 31, 2025

Fixes #25.

LOC delta: +166

- Also update packages to latest versions.
@webJose webJose requested a review from Copilot August 31, 2025 07:38
Copy link
Contributor

Copilot AI left a comment

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 implements major navigation improvements by introducing new navigation APIs, state management enhancements, and comprehensive query preservation functionality. The changes address issue #25 with significant architectural improvements to the routing system.

Key changes include:

  • Introduction of new goTo() method alongside refactored navigate() method with enhanced options
  • Implementation of robust query parameter preservation system with flexible configuration options
  • Addition of utility functions for href calculation, state management, and URL parsing

Reviewed Changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/lib/types.ts Adds PreserveQuery type and restructures navigation options with new GoToOptions and NavigateOptions types
src/lib/index.ts Exports new utility functions and fixes null safety in cleanup function
src/lib/core/preserveQuery.ts Implements query parameter preservation logic with support for boolean, string, and array configurations
src/lib/core/dissectHrefs.ts Adds URL parsing utility to extract paths, search parameters, and hashes from href strings
src/lib/core/calculateState.svelte.ts Implements state calculation logic that preserves routing universe states during navigation
src/lib/core/calculateHref.ts Provides comprehensive href calculation with query preservation and multi-hash support
src/lib/core/RouterEngine.svelte.ts Refactors joinPaths function to handle leading slash detection more robustly
src/lib/core/LocationState.svelte.ts Adds state validation and warning system for non-conformant history states
src/lib/core/LocationLite.svelte.ts Implements new navigation methods and integrates with utility functions
src/lib/Link/Link.svelte Updates Link component to use new href calculation and state management utilities
package.json Updates dependencies to newer versions including Svelte 5.31.0

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

webJose and others added 3 commits August 31, 2025 01:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@webJose webJose merged commit a0af368 into main Sep 1, 2025
@webJose webJose deleted the JP/LinkHrefFix branch September 1, 2025 07:35
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.

Improve support for a variety of hrefs in the Link component

2 participants