mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-20 06:51:59 +00:00
↕️ fix: Enable Vertical Scrolling in Skill Dialogs (#18206)
This commit is contained in:
parent
b075605e98
commit
d4a7f7472f
3 changed files with 14 additions and 3 deletions
|
|
@ -162,7 +162,7 @@ export default function CreateSkillDialog({
|
|||
<OGDialogContent className="w-11/12 max-w-5xl overflow-hidden" showCloseButton={false}>
|
||||
<form
|
||||
onSubmit={handleFormSubmit}
|
||||
className="flex max-h-[80vh] min-w-0 flex-col gap-3 overflow-hidden p-1 sm:gap-4 sm:p-2"
|
||||
className="flex max-h-[85vh] min-w-0 flex-col gap-3 overflow-y-auto p-1 sm:gap-4 sm:p-2"
|
||||
>
|
||||
<h2 className="text-text-primary text-lg font-bold">
|
||||
{localize('com_ui_skill_write_instructions')}
|
||||
|
|
@ -255,7 +255,7 @@ export default function CreateSkillDialog({
|
|||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="flex items-center justify-end gap-2 pt-2">
|
||||
<div className="flex shrink-0 items-center justify-end gap-2 pt-2">
|
||||
<Button type="button" variant="outline" onClick={handleClose}>
|
||||
{localize('com_ui_cancel')}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ export default function UploadSkillDialog({ isOpen, setIsOpen }: UploadSkillDial
|
|||
}}
|
||||
>
|
||||
<OGDialogContent className="w-11/12 max-w-lg overflow-hidden">
|
||||
<div className="flex flex-col gap-6 p-1 sm:p-2">
|
||||
<div className="flex max-h-[85vh] flex-col gap-6 overflow-y-auto p-1 sm:p-2">
|
||||
<h2 className="text-text-primary text-lg font-bold">
|
||||
{localize('com_ui_skill_upload_title')}
|
||||
</h2>
|
||||
|
|
|
|||
|
|
@ -151,4 +151,15 @@ describe('CreateSkillDialog', () => {
|
|||
);
|
||||
expect(handleAgentSubmit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('enables vertical scrolling on the form container so footer buttons remain accessible', () => {
|
||||
render(<CreateSkillDialog isOpen={true} setIsOpen={mockSetIsOpen} />);
|
||||
|
||||
const createButton = screen.getByRole('button', { name: 'Create' });
|
||||
const form = createButton.closest('form');
|
||||
|
||||
expect(form).not.toBeNull();
|
||||
expect(form).toHaveClass('max-h-[85vh]', 'overflow-y-auto');
|
||||
expect(form).not.toHaveClass('overflow-hidden');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue