Skip to content

Conversation

@zenoachtig
Copy link
Contributor

@zenoachtig zenoachtig commented Apr 18, 2025

This PR makes a bunch of design tweaks and adds quality of life improvements to OpenAPI blocks and code blocks.

Cleaner layout for OpenAPI blocks (before, after)

  • Less separators, bolder property names
  • More consistent property titles (like in the response block)

CleanShot 2025-04-23 at 12 49 13@2x
CleanShot 2025-04-23 at 12 48 54@2x

Improved OpenAPI object accordions

  • The entire property is clickable to reveal its child schema(s)
  • Hovering over a property shows a button
  • On mobile/non-hover devices the button is always shown
CleanShot.2025-04-23.at.12.49.40.mp4

New alternative separators

  • Shown between alternative schemas (anyOf, allOf, oneOf)
  • Use string translations for different languages

CleanShot 2025-04-23 at 12 54 35@2x

New color palette for code blocks (before, after)

  • Uses site colors (primary, tint, and semantic colors) to style the code blocks
  • Applies to both code blocks and OpenAPI panels

CleanShot 2025-04-23 at 12 55 55@2x

CleanShot 2025-04-23 at 12 55 45@2x

@changeset-bot
Copy link

changeset-bot bot commented Apr 18, 2025

🦋 Changeset detected

Latest commit: 7a6bb68

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

This PR includes changesets to release 2 packages
Name Type
@gitbook/react-openapi Minor
gitbook 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

@argos-ci
Copy link

argos-ci bot commented Apr 18, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v1 (Inspect) 👍 Changes approved 4 changed Apr 24, 2025, 1:47 PM
customers-v2 (Inspect) 👍 Changes approved 85 changed Apr 24, 2025, 1:51 PM
default (Inspect) 👍 Changes approved 25 changed Apr 24, 2025, 1:50 PM
v2-vercel (Inspect) 👍 Changes approved 26 changed Apr 24, 2025, 1:52 PM

@zenoachtig zenoachtig merged commit 326e28e into main Apr 24, 2025
20 checks passed
@zenoachtig zenoachtig deleted the restyle-openapi-blocks branch April 24, 2025 14:53
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.

3 participants