mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
fix(web): keep HITL input-field save button visible in the edit dialog (#38007)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6ab1dd06ac
commit
267b34caaf
@ -109,7 +109,11 @@ describe('InputField', () => {
|
|||||||
const scrollBody = panel?.children[1]
|
const scrollBody = panel?.children[1]
|
||||||
const footer = panel?.lastElementChild
|
const footer = panel?.lastElementChild
|
||||||
|
|
||||||
expect(panel).toHaveClass('max-h-(--shortcut-popup-max-height)', 'overflow-hidden')
|
// The max-height falls back to a viewport unit so the panel stays bounded
|
||||||
|
// (and the footer/actions reachable via the internal scroll) even when it is
|
||||||
|
// rendered outside the shortcuts popup that defines --shortcut-popup-max-height,
|
||||||
|
// e.g. inside the edit dialog. See issue #37979.
|
||||||
|
expect(panel).toHaveClass('max-h-[var(--shortcut-popup-max-height,80dvh)]', 'overflow-hidden')
|
||||||
expect(header).toHaveClass('shrink-0', 'pb-2')
|
expect(header).toHaveClass('shrink-0', 'pb-2')
|
||||||
expect(scrollBody).toHaveClass('min-h-0', 'flex-1', 'overflow-y-auto')
|
expect(scrollBody).toHaveClass('min-h-0', 'flex-1', 'overflow-y-auto')
|
||||||
expect(footer).toHaveClass('shrink-0', 'bg-components-panel-bg')
|
expect(footer).toHaveClass('shrink-0', 'bg-components-panel-bg')
|
||||||
|
|||||||
@ -216,7 +216,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|||||||
}, [handleSave])
|
}, [handleSave])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex max-h-(--shortcut-popup-max-height) w-[372px] flex-col overflow-hidden rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur shadow-lg backdrop-blur-[5px]">
|
<div className="flex max-h-[var(--shortcut-popup-max-height,80dvh)] w-[372px] flex-col overflow-hidden rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur shadow-lg backdrop-blur-[5px]">
|
||||||
<div className="shrink-0 p-3 pb-2">
|
<div className="shrink-0 p-3 pb-2">
|
||||||
<div className="system-md-semibold text-text-primary">{t(`${i18nPrefix}.title`, { ns: 'workflow' })}</div>
|
<div className="system-md-semibold text-text-primary">{t(`${i18nPrefix}.title`, { ns: 'workflow' })}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user