Skip to content

Repo sync #39338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 15, 2025
Prev Previous commit
Next Next commit
remove search popover (#56639)
  • Loading branch information
Ebonsignori authored Jul 15, 2025
commit 03e227c3b5655e23b1b2389e1efb9a5ff33596d7
11 changes: 2 additions & 9 deletions src/search/components/input/SearchBarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { CopilotIcon, SearchIcon } from '@primer/octicons-react'

import { useTranslation } from '@/languages/components/useTranslation'
import { QueryParams } from '@/search/components/hooks/useMultiQueryParams'
import { useCTAPopoverContext } from '@/frame/components/context/CTAContext'

import styles from './SearchBarButton.module.scss'
import { AISearchCTAPopup } from './AISearchCTAPopup'

type Props = {
isSearchOpen: boolean
Expand All @@ -25,7 +23,6 @@ export function SearchBarButton({
instanceId,
}: Props) {
const { t } = useTranslation('search')
const { isOpen, dismiss } = useCTAPopoverContext()

const urlSearchInputQuery = params['search-overlay-input']

Expand Down Expand Up @@ -57,15 +54,10 @@ export function SearchBarButton({
{/* We don't want to show the input when overlay is open */}
{!isSearchOpen ? (
<>
<AISearchCTAPopup
isOpen={isOpen}
setIsSearchOpen={setIsSearchOpen}
dismiss={dismiss}
instanceId={instanceId}
/>
{/* On mobile only the IconButton is shown */}
<IconButton
data-testid="mobile-search-button"
data-instance={instanceId}
ref={searchButtonRef}
className={styles.searchIconButton}
onClick={handleClick}
Expand All @@ -76,6 +68,7 @@ export function SearchBarButton({
{/* On large and up the SearchBarButton is shown */}
<button
data-testid="search"
data-instance={instanceId}
tabIndex={0}
aria-label={t('search.input.placeholder_no_icon')}
className={styles.searchInputButton}
Expand Down