From 1a4288c81193475bd6f0936b175779d25141289a Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 14 May 2026 18:21:32 +0800 Subject: [PATCH] fix: action btn is hidden if there are many packages to install (#36176) --- .../install-plugin/install-bundle/__tests__/index.spec.tsx | 6 ++++++ .../plugins/install-plugin/install-bundle/index.tsx | 2 +- .../install-bundle/steps/__tests__/install.spec.tsx | 6 ++++++ .../plugins/install-plugin/install-bundle/steps/install.tsx | 4 ++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/web/app/components/plugins/install-plugin/install-bundle/__tests__/index.spec.tsx b/web/app/components/plugins/install-plugin/install-bundle/__tests__/index.spec.tsx index dd3d63aa32..8bd187129c 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/__tests__/index.spec.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/__tests__/index.spec.tsx @@ -261,6 +261,12 @@ describe('InstallBundle', () => { expect(screen.getByText('plugin.installModal.installPlugin')).toBeInTheDocument() }) + it('should constrain modal height to the viewport', () => { + render() + + expect(screen.getByText('plugin.installModal.installPlugin').parentElement?.parentElement).toHaveClass('max-h-[calc(100dvh-48px)]') + }) + it('should render ReadyToInstall component', () => { render() diff --git a/web/app/components/plugins/install-plugin/install-bundle/index.tsx b/web/app/components/plugins/install-plugin/install-bundle/index.tsx index 0a1021591a..7f07ee2150 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/index.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/index.tsx @@ -57,7 +57,7 @@ const InstallBundle: FC = ({ foldAnimInto() }} > - +
diff --git a/web/app/components/plugins/install-plugin/install-bundle/steps/__tests__/install.spec.tsx b/web/app/components/plugins/install-plugin/install-bundle/steps/__tests__/install.spec.tsx index 3e848b35f4..ab6529fe86 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/steps/__tests__/install.spec.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/steps/__tests__/install.spec.tsx @@ -265,6 +265,12 @@ describe('Install Component', () => { expect(screen.getByTestId('all-plugins-count')).toHaveTextContent('2') }) + it('should make the plugin list scrollable inside the modal body', () => { + render() + + expect(screen.getByTestId('install-multi').parentElement).toHaveClass('overflow-y-auto') + }) + it('should show singular text when one plugin is selected', async () => { render() diff --git a/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx b/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx index a94cd8588d..11f8784a64 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx @@ -171,11 +171,11 @@ const Install: FC = ({ const { canInstallPluginFromMarketplace } = useCanInstallPluginFromMarketplace() return ( <> -
+

{t(`${i18nPrefix}.${selectedPluginsNum > 1 ? 'readyToInstallPackages' : 'readyToInstallPackage'}`, { ns: 'plugin', num: selectedPluginsNum })}

-
+