Skip to content

Conversation

@dan-lee
Copy link
Contributor

@dan-lee dan-lee commented Aug 15, 2025

Some types of responses didn't pass through the cardHeader correctly which is needed to render the tabs correctly.

Fixes #1337

@dan-lee dan-lee requested review from Copilot and mosch August 15, 2025 07:48
@dan-lee dan-lee added the bug label Aug 15, 2025
@vercel
Copy link

vercel bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
zudoku-cosmo-cargo Ready Preview Aug 15, 2025 7:49am
zudoku-docs Ready Preview Aug 15, 2025 7:49am

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 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 cardHeader prop
  • 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">
Copy link

Copilot AI Aug 15, 2025

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

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

@dan-lee dan-lee merged commit 61b58b7 into main Aug 15, 2025
9 checks passed
@dan-lee dan-lee deleted the fix/response-tabs branch August 15, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

anyOf responses break the response type selector

3 participants