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

fix(Spec): Expand lint errors and hide the preview pane appropriately #7413

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions packages/insomnia/src/ui/routes/design.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ const Design: FC = () => {
/>
)}
</div>
<div className="flex h-[--line-height-sm] box-border flex-col divide-y divide-solid divide-[--hl-md] overflow-hidden">
<div className={`flex ${isLintPaneOpen ? '' : 'h-[--line-height-sm]'} box-border flex-col divide-y divide-solid divide-[--hl-md] overflow-hidden`}>
<div className="flex gap-2 items-center p-[--padding-sm]">
<TooltipTrigger>
<Button className="flex items-center gap-2 cursor-pointer select-none">
Expand Down Expand Up @@ -1245,10 +1245,14 @@ const Design: FC = () => {
</div>
</div>
</Panel>
<PanelResizeHandle className={direction === 'horizontal' ? 'h-full w-[1px] bg-[--hl-md]' : 'w-full h-[1px] bg-[--hl-md]'} />
<Panel id="pane-two" className='pane-two theme--pane'>
{isSpecPaneOpen && <SwaggerUIDiv text={apiSpec.contents} />}
</Panel>
{isSpecPaneOpen && (
<>
<PanelResizeHandle className={direction === 'horizontal' ? 'h-full w-[1px] bg-[--hl-md]' : 'w-full h-[1px] bg-[--hl-md]'} />
<Panel id="pane-two" className='pane-two theme--pane'>
<SwaggerUIDiv text={apiSpec.contents} />
</Panel>
</>
)}
</PanelGroup>
</Panel>
</PanelGroup>
Expand Down
Loading