Skip to content

Commit 24d0872

Browse files
UN-3185: Pin LLM profile form submit button as a sticky footer (#2119)
* UN-3185: Pin LLM profile form submit button as a sticky footer In the prompt-studio Settings modal, the LLM-profile Add/Edit form put its submit button (Update/Add) as the last element in normal flow inside a fixed 800px scroll column. When the form is tall — e.g. Advanced Settings expanded — the button flowed past the modal's visible area and appeared to overflow. - Make the button a sticky footer (position: sticky; bottom: 0) with a solid themed background so it stays pinned at the bottom of the scroll column and fields scroll beneath it. - The form root's .settings-body-pad-top declared overflow-y: auto with no bounded height — a dead nested scroll context that would stop the sticky footer from pinning to the real scroller (.conn-modal-col). Override it back to visible for this form (scoped via .add-llm-profile-scroll-root). Verified the sticky pinning against the real CSS rules; build green, biome clean. * Apply suggestion from @greptile-apps[bot] Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> --------- Signed-off-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent a1c8cde commit 24d0872

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
/* Styles for AddLlmProfile */
22

3+
/* The settings modal's content column (.conn-modal-col) is the real scroll
4+
container. .settings-body-pad-top declares its own overflow-y: auto with no
5+
bounded height, which does nothing except register a nested scroll context
6+
that would stop the sticky footer below from pinning to .conn-modal-col.
7+
Drop it back to visible for this form. */
8+
.settings-body-pad-top.add-llm-profile-scroll-root {
9+
overflow: visible;
10+
}
11+
12+
/* Pin the submit button to the bottom of the scrollable panel so it stays
13+
visible as the form grows (e.g. Advanced Settings expanded) instead of
14+
flowing past the modal. Background is set inline from the antd theme token
15+
so scrolling fields don't show through. */
16+
.add-llm-profile-footer {
17+
position: sticky;
18+
bottom: 0;
19+
z-index: 1;
20+
margin-bottom: 0;
21+
padding-top: 12px;
22+
border-top: 1px solid var(--ant-color-border-secondary, #f0f0f0);
23+
}
24+
325
.add-llm-profile-row {
426
width: 100%;
527
}

frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ function AddLlmProfile({
453453
};
454454

455455
return (
456-
<div className="settings-body-pad-top">
456+
<div className="settings-body-pad-top add-llm-profile-scroll-root">
457457
<Form
458458
form={form}
459459
layout="vertical"
@@ -633,7 +633,10 @@ function AddLlmProfile({
633633
/>
634634
</div>
635635
</SpaceWrapper>
636-
<Form.Item className="display-flex-right">
636+
<Form.Item
637+
className="display-flex-right add-llm-profile-footer"
638+
style={{ backgroundColor: token.colorBgContainer }}
639+
>
637640
<Space>
638641
<CustomButton type="primary" htmlType="submit" loading={loading}>
639642
{editLlmProfileId ? "Update" : "Add"}

0 commit comments

Comments
 (0)