diff --git a/packages/react/src/FeatureFlags/DefaultFeatureFlags.ts b/packages/react/src/FeatureFlags/DefaultFeatureFlags.ts index daeb9cee255..3ab756ea60f 100644 --- a/packages/react/src/FeatureFlags/DefaultFeatureFlags.ts +++ b/packages/react/src/FeatureFlags/DefaultFeatureFlags.ts @@ -5,5 +5,5 @@ export const DefaultFeatureFlags = FeatureFlagScope.create({ primer_react_css_modules_staff: false, primer_react_css_modules_ga: false, primer_react_action_list_item_as_button: false, - primer_react_select_panel_with_modern_action_list: true, + primer_react_select_panel_with_modern_action_list: false, }) diff --git a/packages/react/src/FilteredActionList/FilteredActionListEntry.tsx b/packages/react/src/FilteredActionList/FilteredActionListEntry.tsx index d8f736514cd..e185ecedfc0 100644 --- a/packages/react/src/FilteredActionList/FilteredActionListEntry.tsx +++ b/packages/react/src/FilteredActionList/FilteredActionListEntry.tsx @@ -6,8 +6,8 @@ import {useFeatureFlag} from '../FeatureFlags' export function FilteredActionList(props: FilteredActionListProps): JSX.Element { const enabled = useFeatureFlag('primer_react_select_panel_with_modern_action_list') - return - // else return + if (enabled) return + else return } FilteredActionList.displayName = 'FilteredActionList' diff --git a/packages/react/src/FilteredActionList/FilteredActionListWithDeprecatedActionList.tsx b/packages/react/src/FilteredActionList/FilteredActionListWithDeprecatedActionList.tsx index 77c4e7c8139..3de9c215a72 100644 --- a/packages/react/src/FilteredActionList/FilteredActionListWithDeprecatedActionList.tsx +++ b/packages/react/src/FilteredActionList/FilteredActionListWithDeprecatedActionList.tsx @@ -35,8 +35,6 @@ export interface FilteredActionListProps onFilterChange: (value: string, e: React.ChangeEvent | null) => void textInputProps?: Partial> inputRef?: React.RefObject - emptyState?: boolean - children?: React.ReactNode } const StyledHeader = styled.div` diff --git a/packages/react/src/FilteredActionList/FilteredActionListWithModernActionList.tsx b/packages/react/src/FilteredActionList/FilteredActionListWithModernActionList.tsx index 162803dbf2b..2ccc9ac9f2c 100644 --- a/packages/react/src/FilteredActionList/FilteredActionListWithModernActionList.tsx +++ b/packages/react/src/FilteredActionList/FilteredActionListWithModernActionList.tsx @@ -18,11 +18,9 @@ import {VisuallyHidden} from '../internal/components/VisuallyHidden' import type {SxProp} from '../sx' import type {FilteredActionListLoadingType} from './FilteredActionListLoaders' import {FilteredActionListLoadingTypes, FilteredActionListBodyLoader} from './FilteredActionListLoaders' -import Text from '../Text' import {isValidElementType} from 'react-is' import type {RenderItemFn} from '../deprecated/ActionList/List' -import {SelectPanelMessage} from '../SelectPanel/SelectPanel' const menuScrollMargins: ScrollIntoViewOptions = {startMargin: 0, endMargin: 8} @@ -37,7 +35,6 @@ export interface FilteredActionListProps onFilterChange: (value: string, e: React.ChangeEvent) => void textInputProps?: Partial> inputRef?: React.RefObject - emptyState?: boolean } const StyledHeader = styled.div` @@ -57,7 +54,6 @@ export function FilteredActionList({ sx, groupMetadata, showItemDividers, - emptyState, message, ...listProps }: FilteredActionListProps): JSX.Element { diff --git a/packages/react/src/SelectPanel/SelectPanel.features.stories.tsx b/packages/react/src/SelectPanel/SelectPanel.features.stories.tsx index f6d779af44c..f2fb3cf5f0b 100644 --- a/packages/react/src/SelectPanel/SelectPanel.features.stories.tsx +++ b/packages/react/src/SelectPanel/SelectPanel.features.stories.tsx @@ -16,7 +16,6 @@ import { } from '@primer/octicons-react' import useSafeTimeout from '../hooks/useSafeTimeout' import Link from '../Link' -import Text from '../Text' const meta = { title: 'Components/SelectPanel/Features', diff --git a/packages/react/src/SelectPanel/SelectPanel.tsx b/packages/react/src/SelectPanel/SelectPanel.tsx index 6934eaa2ab5..eafda3d77a7 100644 --- a/packages/react/src/SelectPanel/SelectPanel.tsx +++ b/packages/react/src/SelectPanel/SelectPanel.tsx @@ -74,6 +74,8 @@ export type SelectPanelMessageProps = { title: string variant: 'noitems' | 'nomatches' } +// we will have more variants in the future like error / warning etc +// eslint-disable-next-line @typescript-eslint/no-unused-vars export const SelectPanelMessage: React.FC = ({variant = 'noitems', title, children}) => { return (