Skip to content

Improve DSN dropdown UX and clipboard tooltip to show exact project #14243

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

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

Conversation

sfanahata
Copy link
Contributor

DESCRIBE YOUR PR
This PR enhances the user experience for interacting with DSN (Data Source Name) snippets in code examples, addressing the suggestions in %2313015.

Key changes include:

  • Enhanced Clipboard Messages: The "Copied" message now displays "Copied for [project name]" to provide clear context.
  • Improved DSN Interactivity: DSN values in code blocks now feature enhanced tooltips ("Current project: [name]. Click to select a different project.") and visual indicators (dotted underline, dropdown arrow) to make their interactive nature more obvious.
  • Automatic DSN Comments: A remark plugin has been added to automatically insert helpful comments above DSN patterns in code blocks, guiding users on how to interact with them.

This PR also includes fixes for local development environment issues encountered during implementation, ensuring the project builds and runs correctly.

%23%23 IS YOUR CHANGE URGENT%3F

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week

%23%23 SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

%23%23 PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Copy link

vercel bot commented Jul 2, 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 Jul 2, 2025 8:12pm
sentry-docs ❌ Failed (Inspect) Jul 2, 2025 8:12pm

Copy link

codecov bot commented Jul 2, 2025

Bundle Report

Changes will increase total bundle size by 866.03kB (4.1%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.8MB 865.07kB (7.91%) ⬆️
sentry-docs-client-array-push 9.8MB 966 bytes (0.01%) ⬆️

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 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 415.85kB -0.0%
static/chunks/app/[[...path]]/page-*.js 972 bytes 84.67kB 1.16%
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
static/vsFrxS2QFRpY2i-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/vsFrxS2QFRpY2i-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/faNJgd1C_V_qcvR6M2tEp/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/faNJgd1C_V_qcvR6M2tEp/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
1614.js -73 bytes 1.05MB -0.01%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 287.59kB 690.56kB 71.37% ⚠️
../app/platform-redirect/page.js.nft.json 287.59kB 690.48kB 71.38% ⚠️
../app/sitemap.xml/route.js.nft.json 287.59kB 688.45kB 71.74% ⚠️
../app/[[...path]]/page.js 809 bytes 592.36kB 0.14%
../app/sitemap.xml/route.js 5 bytes 34.28kB 0.01%
../app/platform-redirect/page.js 57 bytes 31.66kB 0.18%
9567.js 1.51kB 21.85kB 7.41% ⚠️

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

  • ./src/components/apiExamples/apiExamples.tsx → Total Size: 471 bytes

  • ./src/components/codeBlock/index.tsx → Total Size: 1.3kB

Files in 9567.js:

  • ./src/remark-dsn-comments.js → Total Size: 4.07kB

  • ./src/files.ts → Total Size: 783 bytes

  • ./src/mdx.ts → Total Size: 24.12kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] 809 bytes 3.14MB 0.03%
/ 5 bytes 2.61MB 0.0%
/platform-redirect 57 bytes 2.58MB 0.0%

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