Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aali309 committed Jan 11, 2024
1 parent 80feeb1 commit d40c33b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
MenuToggle,
MenuToggleElement,
} from '@patternfly/react-core';
//import { Dropdown, DropdownItem, DropdownPosition, DropdownToggle } from '@patternfly/react-core/deprecated';
import { EllipsisVIcon, FilterIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -128,13 +127,6 @@ export const AutomatedAnalysisFilters: React.FC<AutomatedAnalysisFiltersProps> =
const categoryDropdown = React.useMemo(() => {
return (
<Dropdown
//aria-label={'Category Dropdown'}
//position={DropdownPosition.left}
/* toggle={
<DropdownToggle aria-label={currentCategory} onToggle={onCategoryToggle}>
<FilterIcon /> {getCategoryDisplay(currentCategory)}
</DropdownToggle>
} */
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<MenuToggle ref={toggleRef} aria-label={currentCategory} onClick={() => onCategoryToggle()}>
<FilterIcon />
Expand All @@ -145,7 +137,6 @@ export const AutomatedAnalysisFilters: React.FC<AutomatedAnalysisFiltersProps> =
isOpen={isCategoryDropdownOpen}
popperProps={{
position: 'left',
//aria: 'Category Dropdown',
}}
>
<DropdownList>
Expand Down
36 changes: 14 additions & 22 deletions src/app/Dashboard/DashboardLayoutToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ import {
Dropdown as PF5Dropdown,
DropdownItem as PF5DropdownItem,
} from '@patternfly/react-core';
/* import {
Dropdown as PF4Dropdown,
DropdownItem as PF4DropdownItem,
DropdownToggle,
DropdownToggleAction,
} from '@patternfly/react-core/deprecated';
*/
import {
EllipsisVIcon,
FileIcon,
Expand Down Expand Up @@ -293,24 +286,23 @@ export const DashboardLayoutToolbar: React.FC<DashboardLayoutToolbarProps> = (_p
ref={toggleRef}
className="dashboard-layout-create-dropdown-toggle"
splitButtonOptions={{
items:[
<DropdownItem
key="action"
onClick={(_e) => {
createBlankLayout();
setIsSelectorOpen(false);
}}
>
<span style={{ display: 'flex', alignItems: 'center' }}>
<PlusCircleIcon style={{ marginRight: 'var(--pf-global--spacer--sm)' }} />
{t('DashboardLayoutToolbar.NEW_LAYOUT')}
</span>
</DropdownItem>,
]
items: [
<DropdownItem
key="action"
onClick={(_e) => {
createBlankLayout();
setIsSelectorOpen(false);
}}
>
<span style={{ display: 'flex', alignItems: 'center' }}>
<PlusCircleIcon style={{ marginRight: 'var(--pf-global--spacer--sm)' }} />
{t('DashboardLayoutToolbar.NEW_LAYOUT')}
</span>
</DropdownItem>,
],
}}
variant="primary"
//splitButtonVariant="action"

>
<EllipsisVIcon />
</MenuToggle>
Expand Down
1 change: 0 additions & 1 deletion src/app/Dashboard/LayoutTemplatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import {
MenuToggle,
MenuToggleElement,
} from '@patternfly/react-core';
import { SelectOptionObject } from '@patternfly/react-core/deprecated';
import {
ArrowsAltVIcon,
FilterIcon,
Expand Down
5 changes: 0 additions & 5 deletions src/app/Recordings/ArchivedRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ import {
MenuToggle,
MenuToggleElement,
} from '@patternfly/react-core';
//import { Dropdown, KebabToggle } from '@patternfly/react-core/deprecated';
import { UploadIcon, EllipsisVIcon } from '@patternfly/react-icons';
import { Tbody, Tr, Td, ExpandableRowContent, Table, SortByDirection } from '@patternfly/react-table';
import * as React from 'react';
Expand Down Expand Up @@ -716,12 +715,8 @@ const ArchivedRecordingsToolbar: React.FC<ArchivedRecordingsToolbarProps> = (pro
</OverflowMenuContent>
<OverflowMenuControl>
<Dropdown
//aria-label={'archive-recording-actions'}
isPlain
//isFlipEnabled
onSelect={() => setActionToggleOpen(false)}
//menuAppendTo={'parent'}
//toggle={<KebabToggle id="archive-recording-actions-toggle-kebab" onToggle={handleActionToggle} />}
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<MenuToggle ref={toggleRef} onClick={() => handleActionToggle()}>
<EllipsisVIcon />
Expand Down
8 changes: 0 additions & 8 deletions src/app/Recordings/RecordingFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
MenuToggle,
MenuToggleElement,
} from '@patternfly/react-core';
//import { Dropdown, DropdownItem, DropdownPosition, DropdownToggle } from '@patternfly/react-core/deprecated';
import { FilterIcon, EllipsisVIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { useDispatch, useSelector } from 'react-redux';
Expand Down Expand Up @@ -161,13 +160,6 @@ export const RecordingFilters: React.FC<RecordingFiltersProps> = ({
const categoryDropdown = React.useMemo(() => {
return (
<Dropdown
//aria-label={'Category Dropdown'}
//position={DropdownPosition.left}
/* toggle={
<DropdownToggle aria-label={currentCategory} onToggle={onCategoryToggle}>
<FilterIcon /> {categoriesToDisplayNames[currentCategory]}
</DropdownToggle>
} */
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<MenuToggle ref={toggleRef} aria-label={currentCategory} onClick={() => onCategoryToggle()}>
<FilterIcon />
Expand Down
1 change: 0 additions & 1 deletion src/app/SecurityPanel/Credentials/CredentialTestTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
Select,
SelectOption,
} from '@patternfly/react-core';
//import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
import { ExclamationCircleIcon, SearchIcon, WarningTriangleIcon } from '@patternfly/react-icons';
import {
InnerScrollContainer,
Expand Down

0 comments on commit d40c33b

Please sign in to comment.