Skip to content

Commit 9d39617

Browse files
committed
feat: enhance layout responsiveness in DemoBuilder, MainContent, and StepEditor components #release
1 parent 4e9a9a3 commit 9d39617

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/webviews/src/components/demo/DemoBuilder.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export const DemoBuilder: React.FC = () => {
328328
}
329329

330330
return (
331-
<div className="min-h-screen bg-gray-50 dark:bg-gray-900">
331+
<div className="h-screen flex flex-col bg-gray-50 dark:bg-gray-900">
332332
<AppHeader
333333
title="Config Editor"
334334
subtitle="Manage your demo configuration"
@@ -357,7 +357,7 @@ export const DemoBuilder: React.FC = () => {
357357
}}
358358
/>
359359

360-
<div className="max-w-7xl mx-auto px-6 py-8">
360+
<div className="flex-1 max-w-7xl mx-auto px-6 py-8 w-full overflow-hidden">
361361
{showValidation && (
362362
<div className="mb-8">
363363
<ValidationSummary
@@ -369,8 +369,8 @@ export const DemoBuilder: React.FC = () => {
369369
</div>
370370
)}
371371

372-
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
373-
<Sidebar className="lg:sticky lg:top-24 lg:self-start lg:max-h-[calc(100vh-205px)] lg:overflow-y-auto">
372+
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 h-full min-h-0">
373+
<Sidebar className="lg:sticky lg:top-0 lg:self-start h-full lg:overflow-y-auto">
374374
<Card className='space-y-6'>
375375
<div className="flex items-center">
376376
<button

apps/webviews/src/components/layout/MainContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const MainContent = React.forwardRef<HTMLDivElement, MainContentProps>(({
99
return (
1010
<div
1111
ref={ref}
12-
className={`h-full lg:col-span-2 lg:sticky lg:top-24 lg:self-start lg:max-h-[calc(100vh-205px)] lg:overflow-y-auto custom-scrollbar ${className}`}
12+
className={`h-full lg:col-span-2 lg:overflow-y-auto custom-scrollbar ${className}`}
1313
style={{ scrollBehavior: 'smooth' }}
1414
>
1515
<div className="space-y-6 min-h-full">

apps/webviews/src/components/step/StepEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,8 @@ export const StepEditor: React.FC<StepEditorProps> = ({ step, onChange }) => {
857857
};
858858

859859
return (
860-
<div className="space-y-4">
861-
<div className="flex items-center justify-between">
860+
<div className="space-y-4 h-full">
861+
<div className="flex items-center justify-between sticky top-0 bg-white dark:bg-gray-800 z-10 pb-2">
862862
<h4 className="text-lg font-semibold text-gray-900 dark:text-white">Step Configuration</h4>
863863
<div className="flex items-center gap-2">
864864
<span className="text-sm text-gray-700 dark:text-gray-300">{step.disabled ? 'Disabled' : 'Enabled'}</span>

0 commit comments

Comments
 (0)