fix(automation): add zIndex and withinPortal props to dropdown components for improved UI consistency (#5527)

# Description of Changes
Closes: #5525
Closes: #5242


<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [X] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [X] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [X] I have performed a self-review of my own code
- [X] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### Translations (if applicable)

- [ ] I ran
[`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [X] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

Signed-off-by: Balázs Szücs <[email protected]>
This commit is contained in:
Balázs Szücs
2026-01-21 21:54:13 +00:00
committed by GitHub
parent 68df661204
commit b58efaf388
27 changed files with 76 additions and 3 deletions
@@ -2,6 +2,7 @@ import React, { ReactNode, useState, useMemo } from 'react';
import { Stack, Text, Popover, Box, Checkbox, Group, TextInput } from '@mantine/core';
import UnfoldMoreIcon from '@mui/icons-material/UnfoldMore';
import SearchIcon from '@mui/icons-material/Search';
import { Z_INDEX_AUTOMATE_DROPDOWN } from '@app/styles/zIndex';
export interface DropdownItem {
value: string;
@@ -38,6 +39,8 @@ export interface DropdownListWithFooterProps {
position?: 'top' | 'bottom' | 'left' | 'right';
withArrow?: boolean;
width?: 'target' | number;
withinPortal?: boolean;
zIndex?: number;
}
const DropdownListWithFooter: React.FC<DropdownListWithFooterProps> = ({
@@ -56,7 +59,9 @@ const DropdownListWithFooter: React.FC<DropdownListWithFooterProps> = ({
dropdownClassName = '',
position = 'bottom',
withArrow = false,
width = 'target'
width = 'target',
withinPortal = true,
zIndex = Z_INDEX_AUTOMATE_DROPDOWN
}) => {
const [searchTerm, setSearchTerm] = useState('');
@@ -114,6 +119,8 @@ const DropdownListWithFooter: React.FC<DropdownListWithFooterProps> = ({
withArrow={withArrow}
shadow="md"
onClose={() => searchable && setSearchTerm('')}
withinPortal={withinPortal}
zIndex={zIndex}
>
<Popover.Target>
<Box