-
Notifications
You must be signed in to change notification settings - Fork 54
Fix missing response tabs #1472
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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 fixes a rendering issue where response tabs were missing for certain types of OpenAPI schema responses. The fix ensures that the cardHeader prop is properly passed through all schema view components that render cards.
- Updated multiple schema view components to accept and render
cardHeaderprop - Modified card styling to use consistent overflow handling across components
- Added new schema definitions and error response examples to the demo data
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| UnionView.tsx | Added cardHeader prop to accept and render response tabs |
| SchemaView.tsx | Updated to pass cardHeader through to all child schema components |
| AllOfGroupView.tsx | Added cardHeader prop and adjusted padding to accommodate header |
| shipments.json | Added new error schema definitions and improved response examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <Collapsible.Trigger className="flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5"> | ||
| <Card className="overflow-hidden"> | ||
| {cardHeader} | ||
| <Collapsible.Trigger className="flex gap-2 items-center py-2 px-6 w-full text-sm text-muted-foreground -translate-x-1.5"> |
Copilot
AI
Aug 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The negative translation -translate-x-1.5 appears to be a magic number used to align the trigger with content. This should be documented or replaced with a more semantic approach to avoid layout issues when padding changes.
| <Collapsible.Trigger className="flex gap-2 items-center py-2 px-6 w-full text-sm text-muted-foreground -translate-x-1.5"> | |
| {/* Removed -translate-x-1.5 to avoid magic number. If alignment is needed, adjust padding or margin semantically. */} | |
| <Collapsible.Trigger className="flex gap-2 items-center py-2 px-6 w-full text-sm text-muted-foreground"> |
|
Preview build of published Zudoku package for commit cf95883. See the deployment at: https://bb1e9243.cosmocargo-public-package.pages.dev Note This is a preview of the Cosmo Cargo example using the Zudoku package published to a local registry to ensure it'll be working when published to the public NPM registry. Last updated: 2025-08-15T07:51:14.501Z |
Some types of responses didn't pass through the
cardHeadercorrectly which is needed to render the tabs correctly.Fixes #1337