Skip to content
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

feat(api-reference): cdn custom header example #1775

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hwkr
Copy link
Contributor

@hwkr hwkr commented May 17, 2024

Another swing at making it easier to add a header to the CDN references. The main change here is that we add display: flex; and min-height: 0; to the injected references container which should make it easier to add elements around it and shouldn't break anyones layouts.

Google Chrome-2024-05-17-15-47-15@2x

@hwkr hwkr requested review from hanspagel and amritk May 17, 2024 22:24
@hwkr hwkr requested a review from marclave as a code owner May 17, 2024 22:24
Copy link

changeset-bot bot commented May 17, 2024

⚠️ No Changeset found

Latest commit: 6e34c59

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@hwkr hwkr force-pushed the brynn/doc-1640-cdn-custom-header-example branch from 15ab53f to 33b116d Compare May 17, 2024 22:25
@@ -25,6 +25,6 @@
var apiReference = document.getElementById('api-reference')
apiReference.dataset.configuration = JSON.stringify(configuration)
</script>
<script src="http://localhost:5053/@scalar/fastify-api-reference/js/browser.js"></script>
<script src="http://localhost:5053/reference/@scalar/fastify-api-reference/js/browser.js"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to have been broken at some point.

Copy link

relativeci bot commented May 17, 2024

#2321 Bundle Size — 1.78MiB (~+0.01%).

6e34c59(current) vs 83fcdb8 main#2310(baseline)

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#2321
     Baseline
#2310
Regression  Initial JS 1.78MiB(~+0.01%) 1.78MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 100% 0%
No change  Chunks 1 1
No change  Assets 1 1
No change  Modules 1091 1091
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 152 152
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#2321
     Baseline
#2310
Regression  JS 1.78MiB (~+0.01%) 1.78MiB

Bundle analysis reportBranch brynn/doc-1640-cdn-custom-header...Project dashboard

Copy link
Member

@amritk amritk left a comment

Choose a reason for hiding this comment

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

Shouldn't we ALWAYS be flexin?

@hanspagel hanspagel changed the title feat: cdn custom header example feat(api-reference): cdn custom header example Jun 13, 2024
Copy link
Member

@hanspagel hanspagel left a comment

Choose a reason for hiding this comment

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

This is great! When testing it like this:

pnpm --filter @scalar-examples/cdn-api-reference dev

http://127.0.0.1:3173/api-reference-local-header.html

I see double scrollbars, though. That’s not how it’s supposed to look, is it?

Screenshot 2024-06-19 at 17 07 35

Copy link
Contributor

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.

None yet

3 participants