diff --git a/src/renderer/src/components/right-sidebar/PluginPanel.fixture.tsx b/src/renderer/src/components/right-sidebar/PluginPanel.fixture.tsx new file mode 100644 index 00000000000..d5df9f55edd --- /dev/null +++ b/src/renderer/src/components/right-sidebar/PluginPanel.fixture.tsx @@ -0,0 +1,49 @@ +import { defineFixture } from '../../component-fixtures/component-fixture' +import { usePluginPanelsStore } from '@/store/plugin-panels' +import { buildPluginPanelShellHtml } from '../../../../shared/plugins/frames/plugin-panel-shell' +import PluginPanel from './PluginPanel' + +export const compact = defineFixture({ + width: 280, + setup() { + usePluginPanelsStore.getState().setPlugins([ + { + pluginKey: 'samples.layout', + consentFingerprint: 'fixture', + name: 'Layout', + version: '1.0.0', + publisher: 'samples', + status: 'idle', + needsReconsent: false, + isDev: false, + official: false, + bundled: false, + capabilities: [], + panels: [{ id: 'panel', title: 'Layout', tabKey: 'plugin:samples.layout/panel' }], + commands: [], + hasWorker: false, + restarts: 0 + } + ]) + window.api = { + ...window.api, + plugins: { + ...window.api.plugins, + readPanelEntry: async () => ({ + html: buildPluginPanelShellHtml( + '
Panel bottom
' + ), + sessionToken: 'fixture' + }) + } + } + }, + render: () => ( +
+
Plugin sidebar
+
+ +
+
+ ) +}) diff --git a/src/renderer/src/components/right-sidebar/PluginPanel.tsx b/src/renderer/src/components/right-sidebar/PluginPanel.tsx index 77c4d9e3295..2036ddd521c 100644 --- a/src/renderer/src/components/right-sidebar/PluginPanel.tsx +++ b/src/renderer/src/components/right-sidebar/PluginPanel.tsx @@ -108,7 +108,7 @@ function PluginPanel({ tabKey }: PluginPanelProps): React.JSX.Element { srcDoc={panelDocument ?? ''} onLoad={onFrameLoad} title={panel.title} - className="h-full w-full flex-1 border-0 bg-background" + className="min-h-0 w-full flex-1 border-0 bg-background" /> ) }