Skip to content

feat(fastapi): new HTML/JS API #6552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025
Merged

Conversation

hanspagel
Copy link
Member

Problem

In #6526 @zrquan reported a bug, where you can’t overwrite the default FastAPI theme. I wanted to fix that, but was shocked we're still using the old JS API.

Solution

This PR refactors the integration to use the new HTML/JS API. This also fixes the mentioned bug, where the theme can’t be overwritten.

Checklist

I've gone through the following:

  • I've added an explanation why this change is needed.
  • I've added a changeset (pnpm changeset).
  • I've added tests for the regression or new feature.
  • I've updated the documentation.

@hanspagel hanspagel self-assigned this Aug 13, 2025
@hanspagel hanspagel requested a review from marclave as a code owner August 13, 2025 13:18
Copy link

changeset-bot bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: d641110

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
scalar-fastapi Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hanspagel hanspagel mentioned this pull request Aug 13, 2025
4 tasks
Copy link

relativeci bot commented Aug 13, 2025

#12365 Bundle Size — 2.65MiB (0%).

d641110(current) vs 98bfa38 main#12363(baseline)

Warning

Bundle contains 1 duplicate package – View duplicate packages

Bundle metrics  no changes
                 Current
#12365
     Baseline
#12363
No change  Initial JS 2.65MiB 2.65MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 1 1
No change  Assets 1 1
No change  Modules 1817 1817
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 168 168
No change  Duplicate Packages 1 1
Bundle size by type  no changes
                 Current
#12365
     Baseline
#12363
No change  JS 2.65MiB 2.65MiB

Bundle analysis reportBranch feat/new-html-js-api-for-fastapiProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Contributor

Copy link
Contributor

Copy link
Contributor

Scalar Components Snapshot Test Results

passed  50 passed

Details

report  Open report ↗︎
stats  50 tests across 15 suites
duration  51.6 seconds
commit  d641110

Copy link
Member

@geoffgscott geoffgscott left a comment

Choose a reason for hiding this comment

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

Untested but the code looks good

@hanspagel
Copy link
Member Author

The current release has a few painful regressions, I’ve tested it manually and it has tests and I think @marclave is too busy to review rn, so I'll just merge it and queue it up for release.

@hanspagel hanspagel merged commit 77af6e7 into main Aug 14, 2025
44 checks passed
@hanspagel hanspagel deleted the feat/new-html-js-api-for-fastapi branch August 14, 2025 09:57
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