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

API examples syntax highlighting #11715

Merged
merged 11 commits into from
Nov 4, 2024
Merged

API examples syntax highlighting #11715

merged 11 commits into from
Nov 4, 2024

Conversation

a-hariti
Copy link
Collaborator

@a-hariti a-hariti commented Nov 2, 2024

The intent was to unify the syntax highlighting logic for API examples and other docs,
but API examples have specific requirements that prevent us from reusing existing logic

code blocks are usually handled though CodeTabs, which adds tabs and manages the corresponding code blocks, but we need more tabs (api responses for example)

The curl bash snippet was possible to handle using a simple CodeBlock

I tried to use the same syntax highlighting libraries (using refractor) server side, and gave the API examples code blocks the same look and behavior as elsewhere

verify here

closes #11093

Copy link

vercel bot commented Nov 2, 2024

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

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 6:38pm
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 6:38pm
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 6:38pm

@a-hariti a-hariti changed the title Api syntax highlighting API examples syntax highlighting Nov 2, 2024
Copy link

codecov bot commented Nov 2, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 8.39MB 76.89kB (0.93%) ⬆️
sentry-docs-edge-server-array-push 333.11kB 3 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 6.47MB 28.02kB (0.44%) ⬆️

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Thanks! Can you leave a brief explanation why we the global syntax highlighting does not work?

@a-hariti a-hariti merged commit d886d88 into master Nov 4, 2024
13 checks passed
@a-hariti a-hariti deleted the api-syntax-highlighting branch November 4, 2024 11:21
martinhaintz pushed a commit that referenced this pull request Nov 5, 2024
* master: (213 commits)
  Remove feature flag documentation from issue details page (#11734)
  docs(insights): Remove EA note from Queries re: MongoDB (#11735)
  docs(nuxt): `piniaIntegration` in Nuxt (#11684)
  feat(flags): Add OpenFeature and LaunchDarkly integration documentation (#11675)
  Cleaning up mermaid code and made it a bit more readable in dark mode (#11726)
  docs(scopes): Add graphics for scope forking (#11702)
  Unreal Engine plugin documentation update (#11625)
  Bump API schema to 25e528ff (#11728)
  Bump API schema to 12bd311c (#11725)
  fix dark theme resolution (#11718)
  Update sign in to go to sentry (#11723)
  getsentry/relay@4bdad17
  API examples syntax highlighting (#11715)
  feat: Convert mermaid code blocks to SVGs client side (#11690)
  Trace context is required for transactions (#11456)
  deps: Bump SDK to 8.36.0 (#11696)
  getsentry/relay@2e2587c
  MAUI screenshot `SetBeforeScreenshotCapture`(#11672)
  Add CSS rule to fix color of bold links (#11707)
  Fix small typo on web-vitals-concepts (#11706)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify API pages code snippets
2 participants