Skip to content

Commit 1f5a75a

Browse files
dylanjeffersclaude
andcommitted
fix: explore page filters not applying consistently across all content sections
Bug 1 (web): Align static explore section visibility with SearchResults render condition — hide sections when inputValue is set (during debounce window) in addition to when showSearchResults is true, so Premium and other filters applied via the filter pills always suppress unfiltered curated sections. Bug 2 (web): Guard empty-state tile behind !isPending in AlbumResultsPage and PlaylistResultsPage so the NoResultsTile is not shown while the query is still in its initial loading phase, preventing a spurious empty-state flash when combining "Downloads Available" + "Electronic" genre filters. Bug 3 (mobile): Include category !== 'all' in the showSearch guard on the explore screen so tapping a content-type pill (Tracks, Albums, etc.) immediately shows the filtered SearchResults without requiring a second filter to be added. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 81d5fdb commit 1f5a75a

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/mobile/src/screens/explore-screen/SearchExploreScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { useExploreRoute } from './hooks'
2121
const SearchExploreContent = () => {
2222
const { params } = useExploreRoute<'SearchExplore'>()
2323
const scrollRef = useRef<any>(null)
24-
const [, setCategory] = useSearchCategory()
24+
const [category, setCategory] = useSearchCategory()
2525
const [filters, setFilters] = useSearchFilters()
2626
const [query, setQuery] = useSearchQuery()
2727
const [, setAutoFocus] = useSearchAutoFocus()
@@ -50,7 +50,7 @@ const SearchExploreContent = () => {
5050
}
5151
})
5252

53-
const showSearch = Boolean(query || hasAnyFilter)
53+
const showSearch = Boolean(query || hasAnyFilter || category !== 'all')
5454

5555
return (
5656
<ScreenContent>

packages/web/src/pages/search-explore-page/components/desktop/SearchExplorePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ const SearchExplorePage = ({
344344
minWidth: MIN_DESKTOP_CONTENT_WIDTH_PX,
345345
overflowX: 'clip',
346346
overflowY: 'visible',
347-
display: showSearchResults ? 'none' : undefined
347+
display: inputValue || showSearchResults ? 'none' : undefined
348348
}}
349349
>
350350
{sectionConfigs.map(({ key, shouldRender, element }) =>

packages/web/src/pages/search-explore-page/components/mobile/SearchExplorePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const SearchExplorePage = ({
224224
direction='column'
225225
mt='l'
226226
gap='2xl'
227-
css={{ display: showSearchResults ? 'none' : undefined }}
227+
css={{ display: inputValue || showSearchResults ? 'none' : undefined }}
228228
>
229229
{showTrackContent && showUserContextualContent ? (
230230
<RecommendedTracksSection />

packages/web/src/pages/search-page/search-results/AlbumResults.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const AlbumResultsPage = () => {
152152
const { data, isFetching, hasNextPage, loadNextPage, isPending } = queryData
153153

154154
const isResultsEmpty = data?.length === 0
155-
const showNoResultsTile = !isFetching && isResultsEmpty
155+
const showNoResultsTile = !isFetching && !isPending && isResultsEmpty
156156

157157
return (
158158
<InfiniteScroll

packages/web/src/pages/search-page/search-results/PlaylistResults.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export const PlaylistResultsPage = () => {
159159
} = queryData
160160

161161
const isResultsEmpty = playlists?.length === 0
162-
const showNoResultsTile = !isFetching && isResultsEmpty
162+
const showNoResultsTile = !isFetching && !isPending && isResultsEmpty
163163

164164
return (
165165
<InfiniteScroll

0 commit comments

Comments
 (0)