Skip to content

Conversation

@nolannbiron
Copy link
Member

@nolannbiron nolannbiron commented Nov 19, 2025

Before:
CleanShot 2025-11-19 at 15 00 18@2x

After:
CleanShot 2025-11-19 at 15 02 49@2x

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: 9376c39

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 Patch
gitbook Patch

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 Nov 19, 2025

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

Build Status Details Updated (UTC)
customers-v2 (Inspect) ✅ No changes detected - Nov 19, 2025, 9:21 PM
v2-cloudflare (Inspect) 👍 Changes approved 6 changed Nov 19, 2025, 9:25 PM
v2-vercel (Inspect) 👍 Changes approved 8 changed Nov 19, 2025, 9:24 PM

@nolannbiron nolannbiron requested review from Copilot and gregberge and removed request for Copilot November 19, 2025 15:16
Copilot finished reviewing on behalf of nolannbiron November 19, 2025 15:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the handling and visual presentation of circular references in OpenAPI schemas. When a schema references itself, the component now displays a more complete presentation with the circular reference indicator, and ensures proper scroll-to-anchor behavior with updated styling.

  • Refactored circular reference handling to render OpenAPISchemaPresentation instead of just OpenAPISchemaCircularRef
  • Moved the element ID from OpenAPIDisclosure to its parent wrapper div to enable anchor linking
  • Updated circular reference UI with repositioned glyph and improved styling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/react-openapi/src/OpenAPISchema.tsx Refactored circular reference rendering to use OpenAPISchemaPresentation with conditional content display; moved ID attribute to wrapper div for proper anchor navigation
packages/gitbook/src/components/DocumentView/OpenAPI/style.css Added scroll margin for anchor navigation, adjusted circular reference text size and glyph spacing
.changeset/yellow-jobs-nail.md Added changeset documenting the improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nolannbiron nolannbiron force-pushed the nolann/fix-circular-refs-openapi branch from 8190c4b to 9376c39 Compare November 19, 2025 21:14
@nolannbiron nolannbiron merged commit 344842f into main Nov 19, 2025
16 checks passed
@nolannbiron nolannbiron deleted the nolann/fix-circular-refs-openapi branch November 19, 2025 21:44
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