Skip to content

Commit 3c0966a

Browse files
authored
chore(preprod): Adjust preprod search bar visibility (#105551)
- Always render the preprod search bar in release/mobile builds views - Disable the search input while builds are loading Part of stack to add distribution table - #105551 - #105552 - #105553 - #105554
1 parent 58b5a8a commit 3c0966a

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

static/app/views/releases/detail/commitsAndFiles/preprodBuilds.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export default function PreprodBuilds() {
100100
const pageLinks = getResponseHeader?.('Link') || null;
101101

102102
const hasSearchQuery = !!urlSearchQuery?.trim();
103-
const shouldShowSearchBar = builds.length > 0 || hasSearchQuery;
104103
const showOnboarding = builds.length === 0 && !hasSearchQuery && !isLoadingBuilds;
105104

106105
const handleBuildRowClick = useCallback(
@@ -125,15 +124,14 @@ export default function PreprodBuilds() {
125124
projectSlug={projectSlug}
126125
/>
127126
{buildsError && <LoadingError onRetry={refetch} />}
128-
{shouldShowSearchBar && (
129-
<Container paddingBottom="md">
130-
<SearchBar
131-
placeholder={t('Search by build, SHA, branch name, or pull request')}
132-
onChange={handleSearch}
133-
query={localSearchQuery}
134-
/>
135-
</Container>
136-
)}
127+
<Container paddingBottom="md">
128+
<SearchBar
129+
placeholder={t('Search by build, SHA, branch name, or pull request')}
130+
onChange={handleSearch}
131+
query={localSearchQuery}
132+
disabled={isLoadingBuilds}
133+
/>
134+
</Container>
137135
{showOnboarding ? (
138136
<PreprodOnboarding
139137
organizationSlug={organization.slug}

static/app/views/releases/list/mobileBuilds.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,16 @@ export default function MobileBuilds({organization, selectedProjectIds}: Props)
8787
const builds = buildsData?.builds ?? [];
8888
const pageLinks = getResponseHeader?.('Link') ?? undefined;
8989
const hasSearchQuery = !!searchQuery?.trim();
90-
const shouldShowSearchBar = builds.length > 0 || hasSearchQuery;
9190
const showProjectColumn = selectedProjectIds.length > 1;
9291

9392
return (
9493
<Stack gap="xl">
95-
{shouldShowSearchBar && (
96-
<SearchBar
97-
placeholder={t('Search by build, SHA, branch name, or pull request')}
98-
onSearch={handleSearch}
99-
query={searchQuery ?? undefined}
100-
/>
101-
)}
94+
<SearchBar
95+
placeholder={t('Search by build, SHA, branch name, or pull request')}
96+
onSearch={handleSearch}
97+
query={searchQuery ?? undefined}
98+
disabled={isLoadingBuilds}
99+
/>
102100

103101
{buildsError && <LoadingError onRetry={refetch} />}
104102

0 commit comments

Comments
 (0)