Skip to content

update reflex ui links#6326

Merged
carlosabadia merged 1 commit intomainfrom
carlos/update-links
Apr 14, 2026
Merged

update reflex ui links#6326
carlosabadia merged 1 commit intomainfrom
carlos/update-links

Conversation

@carlosabadia
Copy link
Copy Markdown
Contributor

No description provided.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 14, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing carlos/update-links (f835842) with main (69a5cee)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 14, 2026

Greptile Summary

This PR migrates all anchor elements in the reflex-ui-shared marketing components from rx.el.a (which resolves to React Router's Link component) to rx.el.elements.a (the raw HTML <a> element), and replaces the to= / is_external= props with standard href= / target=\"_blank\".

  • Internal link routing regression: rx.el.a is explicitly aliased to React Router's Link in reflex_components_core/el/__init__.py. Switching internal paths (/, /pricing, /docs, /blog, /customers/, platform items, solutions items, and the hosting banner's /blog/on-premises-deployment) to rx.el.elements.a replaces client-side SPA navigation with full-page browser reloads.

Confidence Score: 4/5

Safe to merge only if full-page reloads on internal links are acceptable; otherwise needs revisiting for paths like /, /pricing, /docs, /blog, etc.

One P1 finding: all internal navigation links now trigger full-page reloads because rx.el.elements.a is the raw HTML anchor, not the React Router Link that rx.el.a resolves to. External links with target="_blank" are unaffected and correct.

marketing_navbar.py and footer.py contain internal navigation links that will lose SPA client-side routing behavior; hosting_banner.py also has an internal path affected.

Important Files Changed

Filename Overview
packages/reflex-ui-shared/src/reflex_ui_shared/views/marketing_navbar.py All rx.el.a calls replaced with rx.el.elements.a and to= with href=; internal nav links (logo /, /pricing, /docs, /blog, /customers/, platform/solutions items) now use raw HTML anchors and trigger full-page reloads instead of React Router client-side navigation.
packages/reflex-ui-shared/src/reflex_ui_shared/views/footer.py Logo link (href="/") switched from React Router Link to raw HTML <a>; footer links and social items use target="_blank" and are external, so those changes are benign.
packages/reflex-ui-shared/src/reflex_ui_shared/views/hosting_banner.py BLOG_LINK = "/blog/on-premises-deployment" (internal path, previously is_external=False) now uses raw HTML <a>, causing a full-page reload on click.
packages/reflex-ui-shared/src/reflex_ui_shared/views/cta_card.py External link (REFLEX_BUILD_URL, target="_blank") updated correctly from to= to href= with rx.el.elements.a; no routing regression for external URLs.
packages/reflex-ui-shared/src/reflex_ui_shared/components/code_card.py Demo URL link is external with target="_blank"; swap from is_external=True to target="_blank" is correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["rx.el.a (before)"] -->|"resolves to"| B["ReactRouterLink (react-router Link)"]
    B -->|"uses prop"| C["to='/pricing'"]
    B -->|"renders"| D["Client-side navigation\n(no page reload)"]

    E["rx.el.elements.a (after)"] -->|"resolves to"| F["Raw HTML <a> element"]
    F -->|"uses prop"| G["href='/pricing'"]
    F -->|"renders"| H["Full-page browser reload"]

    style D fill:#bbf,stroke:#336
    style H fill:#fbb,stroke:#933
Loading

Reviews (1): Last reviewed commit: "update reflex ui links" | Re-trigger Greptile

Comment on lines 100 to 110
@@ -108,7 +108,7 @@ def logo() -> rx.Component:
alt="Reflex Logo",
class_name="shrink-0 hidden dark:block",
),
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.

P1 Internal links lose client-side routing

rx.el.a is deliberately aliased to React Router's Link component (reflex_components_core.react_router.link), as documented in reflex_components_core/el/__init__.py:

# el.a is replaced by React Router's Link.
_EXTRA_MAPPINGS: dict[str, str] = {
    "a": "reflex_components_core.react_router.link",
}

rx.el.elements.a, by contrast, is the raw HTML <a> element — navigation triggers a full-page reload instead of React Router's client-side transition.

The logo (href="/"), pricing, docs, blog (href="/blog"), customers (href="/customers/"), platform and solutions menu items, and the hosting banner's BLOG_LINK = "/blog/on-premises-deployment" are all internal paths. Switching them to rx.el.elements.a breaks SPA navigation for every one of those links. For external links with target="_blank" this change is fine.

@carlosabadia carlosabadia merged commit e05eb8f into main Apr 14, 2026
40 checks passed
@carlosabadia carlosabadia deleted the carlos/update-links branch April 14, 2026 01: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.

3 participants