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: Allow to have top level alias for platforms #13069

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 20, 2025

Today, it is a bit confusing in some cases, but especially JavaScript, that the top level platform is called "JavaScript" (which all guides inherit from), but actually it is just Browser JavaScript.

This adds a new field which, when set for a platform, will lead to a slightly different behavior:

Screenshot 2025-03-20 at 16 30 08

And

Screenshot 2025-03-20 at 16 27 03

Some notes:

  1. When you click on the top level "JavaScript" in the sidebar, it will basically "redirect" to "Browser JavaScript"
  2. For other platforms that have not set this field, nothing changes - so with this PR, only JS changes.
  3. The breadcrumbs are a bit tricky/weird, there I opted to leave it as it is for now 🤔 it's a bit inconsistent, but everything else is quite tricky as the hierarchy needs to change based on if a guide is selected etc. we may tweak this still...

@mydea mydea self-assigned this Mar 20, 2025
Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2025 11:26am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2025 11:26am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Mar 21, 2025 11:26am

Copy link

codecov bot commented Mar 20, 2025

Bundle Report

Changes will increase total bundle size by 467 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.59MB 313 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.43MB 154 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.78kB -0.0%
static/chunks/3319-*.js -3 bytes 394.16kB -0.0%
static/chunks/app/[[...path]]/page-*.js 71 bytes 75.13kB 0.09%
static/chunks/818-*.js 89 bytes 42.41kB 0.21%
static/HXpsENSKNXiWT6Hd3mLfo/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/HXpsENSKNXiWT6Hd3mLfo/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/lEMKawQGy_E4xJXsReprn/_buildManifest.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/lEMKawQGy_E4xJXsReprn/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Files in static/chunks/app/[[...path]]/page-*.js:

  • ./src/components/platformFilter/client.tsx → Total Size: 15.16kB

Files in static/chunks/818-*.js:

  • ./src/components/platformSelector/index.tsx → Total Size: 20.16kB
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.58MB -0.0%
../instrumentation.js -3 bytes 908.25kB -0.0%
9523.js -3 bytes 884.31kB -0.0%
../app/[[...path]]/page.js 71 bytes 535.0kB 0.01%
2065.js 251 bytes 82.23kB 0.31%

Files in ../app/[[...path]]/page.js:

  • ./src/components/platformFilter/client.tsx → Total Size: 505 bytes

Files in 2065.js:

  • ./src/components/platformSelector/index.tsx → Total Size: 490 bytes

  • ./src/docTree.ts → Total Size: 10.86kB

  • ./src/components/breadcrumbs/index.tsx → Total Size: 1.13kB

  • ./src/components/platformSelector/index.tsx → Total Size: 19.07kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] 71 bytes 3.08MB 0.0%

@mydea mydea requested review from stephanie-anderson, a-hariti and chargome and removed request for stephanie-anderson and a-hariti March 21, 2025 11:08
@mydea mydea changed the title WIP: Allow to have top level alias for platforms feat: Allow to have top level alias for platforms Mar 21, 2025
@mydea mydea marked this pull request as ready for review March 21, 2025 11:08
@coolguyzone
Copy link
Contributor

Hey @mydea , is there an Issue or some other context where this came up? I agree this could be more clear, I'm not sure about using Browser JavaScript though, are web browsers the only application for vanilla JavaScript?

cc @codyde

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