Skip to content

add rx.asset to docs app fonts#6352

Merged
carlosabadia merged 1 commit intomainfrom
carlos/rx-asset-fonts
Apr 21, 2026
Merged

add rx.asset to docs app fonts#6352
carlosabadia merged 1 commit intomainfrom
carlos/rx-asset-fonts

Conversation

@carlosabadia
Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR replaces hardcoded font paths (/fonts/instrument-sans.woff2 and /fonts/jetbrains-mono.woff2) in the head_components preload links with rx.asset(...) calls, making the font references portable and consistent with Reflex's asset-handling convention.

Confidence Score: 5/5

Safe to merge — minimal, correct change with no side effects.

The change is a two-line swap from hardcoded paths to rx.asset(), which is the idiomatic Reflex API for referencing project assets. No logic is altered, no new dependencies are introduced, and no custom rules are violated.

No files require special attention.

Important Files Changed

Filename Overview
docs/app/reflex_docs/reflex_docs.py Replaces two hardcoded font href strings with rx.asset() calls for instrument-sans.woff2 and jetbrains-mono.woff2 preload links.

Sequence Diagram

sequenceDiagram
    participant App as rxe.App
    participant RxAsset as rx.asset()
    participant Browser as Browser

    App->>RxAsset: rx.asset("fonts/instrument-sans.woff2")
    RxAsset-->>App: resolved asset URL
    App->>RxAsset: rx.asset("fonts/jetbrains-mono.woff2")
    RxAsset-->>App: resolved asset URL
    App->>Browser: <link rel="preload" href=resolved_url type="font/woff2">
    Browser->>Browser: Preload fonts before page render
Loading

Reviews (1): Last reviewed commit: "add rx.asset to docs app fonts" | Re-trigger Greptile

@carlosabadia carlosabadia merged commit 060f9a2 into main Apr 21, 2026
45 of 47 checks passed
@carlosabadia carlosabadia deleted the carlos/rx-asset-fonts branch April 21, 2026 18:01
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 21, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing carlos/rx-asset-fonts (04493a4) with main (0d9f0c5)

Open in CodSpeed

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