Skip to content

add url and route_id to routerdata as a replacement for pagedata#5516

Merged
adhami3310 merged 4 commits into
mainfrom
add-url-and-route_id-to-routerdata-as-a-replacement-for-pagedata
Jul 2, 2025
Merged

add url and route_id to routerdata as a replacement for pagedata#5516
adhami3310 merged 4 commits into
mainfrom
add-url-and-route_id-to-routerdata-as-a-replacement-for-pagedata

Conversation

@adhami3310
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Major refactoring to transition from PageData to RouterData by adding URL handling and route identification capabilities across multiple components.

  • Added ReflexURL class in reflex/istate/data.py extending str for enhanced URL parsing
  • Introduced factory method RouterData.from_router_data() replacing direct initialization in reflex/app.py and test files
  • Added url and route_id fields to RouterData structure for better route tracking
  • Modified asPath property in .templates/web/utils/state.js to include window.location.hash
  • Note: Potential code duplication between headers.origin and page.host needs resolution

6 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jul 2, 2025

CodSpeed Performance Report

Merging #5516 will not alter performance

Comparing add-url-and-route_id-to-routerdata-as-a-replacement-for-pagedata (cfbe917) with main (09ed66c)

Summary

✅ 8 untouched benchmarks

@adhami3310 adhami3310 merged commit a83ce0c into main Jul 2, 2025
41 checks passed
@adhami3310 adhami3310 deleted the add-url-and-route_id-to-routerdata-as-a-replacement-for-pagedata branch July 2, 2025 17:15
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