Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export const TfvarsFilesPopover = () => {
))}
</>
) : tfVarFiles.length > 0 ? (
<ScrollShadowWrapper hideSides className="max-h-[300px]">
<div className="max-h-[300px]">
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max-h-[300px] alone won’t make the list scrollable; with the default overflow: visible the items will overflow outside the popover instead of scrolling (previously handled by ScrollShadowWrapper’s overflow-y-auto). Add overflow-y-auto (and any needed padding like the prior pr-[1px]) to preserve the intended scroll behavior.

Suggested change
<div className="max-h-[300px]">
<div className="max-h-[300px] overflow-y-auto pr-[1px]">

Copilot uses AI. Check for mistakes.
<Reorder.Group axis="y" values={tfVarFiles} onReorder={onReorder}>
Comment on lines +250 to 251
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After replacing ScrollShadowWrapper with a div, the ScrollShadowWrapper import from @qovery/shared/ui becomes unused and will fail lint/TS checks. Remove it from the imports list.

Copilot uses AI. Check for mistakes.
{tfVarFiles?.map((file, index) => (
<Reorder.Item
Expand All @@ -263,7 +263,7 @@ export const TfvarsFilesPopover = () => {
</Reorder.Item>
))}
</Reorder.Group>
</ScrollShadowWrapper>
</div>
) : null}
</div>
</Popover.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ export interface ScrollShadowWrapperProps {
children: ReactNode
className?: string
style?: CSSProperties
hideSides?: boolean
}

export function ScrollShadowWrapper(props: ScrollShadowWrapperProps) {
const { children, className = '', style = {}, hideSides = false } = props
const { children, className = '', style = {} } = props

const [scrollTop, setScrollTop] = useState(0)
const [scrollHeight, setScrollHeight] = useState(0)
Expand Down Expand Up @@ -53,23 +52,19 @@ export function ScrollShadowWrapper(props: ScrollShadowWrapperProps) {
className={`relative overflow-y-auto pr-[1px] ${className}`}
onScroll={onScrollHandler}
>
{!hideSides && (
<div
data-testid="scroll-shadow-top"
className={`pointer-events-none sticky top-0 z-overlay -mb-4 h-5 w-full bg-scroll-shadow-up transition-opacity duration-300 ${
getVisibleSides().top ? 'opacity-100' : 'opacity-0'
}`}
/>
)}
<div
data-testid="scroll-shadow-top"
className={`pointer-events-none sticky top-0 z-overlay -mb-4 h-5 w-full bg-scroll-shadow-up transition-opacity duration-300 ${
getVisibleSides().top ? 'opacity-100' : 'opacity-0'
}`}
/>
{children}
{!hideSides && (
<div
data-testid="scroll-shadow-bottom"
className={`pointer-events-none sticky bottom-0 z-overlay -mt-4 h-5 w-full rotate-180 bg-scroll-shadow-bottom transition-opacity duration-300 ${
getVisibleSides().bottom ? 'opacity-100' : 'opacity-0'
}`}
/>
)}
<div
data-testid="scroll-shadow-bottom"
className={`pointer-events-none sticky bottom-0 z-overlay -mt-4 h-5 w-full rotate-180 bg-scroll-shadow-bottom transition-opacity duration-300 ${
getVisibleSides().bottom ? 'opacity-100' : 'opacity-0'
}`}
/>
</div>
)
}
Expand Down
Loading