Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[Reloaded] Keep relevant search results in store c-1117#1973

Merged
nicoback2 merged 1 commit into
mainfrom
nkang--optimize-search
Sep 23, 2022
Merged

[Reloaded] Keep relevant search results in store c-1117#1973
nicoback2 merged 1 commit into
mainfrom
nkang--optimize-search

Conversation

@nicoback2

Copy link
Copy Markdown
Contributor

Description

-Improve search results screen performance
Before: When you switched tabs, it would refetch the results even if it was already fetched before
After: We keep and reuse old results for same query

Regular search:
earchy

Tag search:
earchy2

Dragons

Is there anything the reviewer should be on the lookout for? Are there any dangerous changes?

How Has This Been Tested?

Tested in mobile and tested for regressions on web.

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.

How will this change be monitored?

For features that are critical or could fail silently please describe the monitoring/alerting being added.

Feature Flags

Are all new features properly feature flagged? Describe added feature flags.

@dylanjeffers dylanjeffers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woah this is all so sick! so does it work with desktop as well?


useEffect(() => {
if (!isFocused) {
// Prevents a large rerender in the middle of a stack navigation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch here as well

useFocusEffect(
useCallback(() => {
return () => {
dispatch(tracksActions.reset())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we want to call reset?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to call it here because otherwise it'll clear the lineup even if you're moving between tabs (we want to keep it in case you come back). Tested thoroughly and there doesn't seem to be any issues with leaving this out altogether.

@audius-infra

Copy link
Copy Markdown
Collaborator

Preview this change https://demo.audius.co/nkang--optimize-search

@nicoback2

Copy link
Copy Markdown
Contributor Author

woah this is all so sick! so does it work with desktop as well?

it just refetches on desktop still since i didn't touch that code :o but i made sure there weren't any regressions from what's on prod!

@nicoback2 nicoback2 marked this pull request as ready for review September 22, 2022 21:37
@nicoback2 nicoback2 merged commit 69f9c6f into main Sep 23, 2022
@nicoback2 nicoback2 deleted the nkang--optimize-search branch September 23, 2022 00:20
audius-infra pushed a commit that referenced this pull request Sep 24, 2022
[2d44919] Fix now-playing navigation (#1992) Dylan Jeffers
[d7065e6] Update react-native-screens patchfile (#1991) Dylan Jeffers
[7348257] [C-1172] Add screen freeze (#1990) Dylan Jeffers
[d4c9f17] Fix TopSupporters, TrackScreen caching (#1989) Dylan Jeffers
[38a4f59] Prevent track restart by adding selector equality for track owner (#1957) Sebastian Klingler
[c2eb69e] [C-482] Fix android navigation bar clipping (#1988) Dylan Jeffers
[0da8377] [PLAT-98] Add feature flag for auto sub (#1979) Raymond Jacobson
[7ce5b87] [C-1151] Fix empty profile tab (#1984) Dylan Jeffers
[4aff4ee] [C-1048] Reset scrubber on song repeat (#1985) Dylan Jeffers
[c48df76] [C-1160,C-1161] Fix search navigation (#1980) Dylan Jeffers
[a2a6b4b] Fix mobile favorites c-831 (#1981) nicoback2
[5dce1d4] Update stage mobile env to goerli (#1987) Raymond Jacobson
[bd5aadb] Fix mac build (#1986) Raymond Jacobson
[eba0787] fix tag search more results (#1983) nicoback2
[39b66f4] Remove trimtoalphanumeric (#1982) Raymond Jacobson
[69f9c6f] keep relevant search results in store (#1973) nicoback2
[c76faaa] fix playlist link in tile overflow menu (#1976) nicoback2
[93903ca] Update staging to use goerli addresses (#1978) Isaac Solo
[f369627] [C-1152] Improve favorites tab performance (#1975) Dylan Jeffers
[b24dbe4] Fix playlist challenge optimistic update (#1974) Michael Piazza
[d31daf7] Set limit when getting bulk tracks by id because default is 100 (#1970) Sebastian Klingler
[d602cca] Update new table styles for qa issues (#1969) Kyle Shanks
[62097aa] Disable account sync to test app failure (#1972) Dylan Jeffers
[a40953d] [C-1137] Add debounce to change in NetworkInfo status (#1967) Andrew Mendelsohn
[7c765af] [C-976] Fix native artist recommendations (#1971) Dylan Jeffers
[a48eed5] [C-1004] Fix sign-up -> sign-in email bug (#1968) Dylan Jeffers
[8f9ed13] [C-1090] Improve profile store layout (#1963) Dylan Jeffers
[b1003b8] [C-978] Check for track repeat before advancing shuffle (#1965) Andrew Mendelsohn
[d5aa252] Update new table styles for table action buttons (#1964) Kyle Shanks
[074f0bd] Prevent toasts from appearing when overflow menu is clicked (#1962) Sebastian Klingler
[a333649] Remove filter skeletone from new tables (#1961) Kyle Shanks
[5291b03] c-1127 Fix more search results track lineup (#1959) nicoback2
[722819b] Upgrade CI xcode and provide dSyms (#1960) Raymond Jacobson
[36ca926] Add track entity manager feature flag (#1743) Joseph Lee
[d2a5065] fix search result -> track screen bug (#1955) nicoback2
[5f0d280] [PAY-634] On Ramp Design Fixes (Part 1) (#1949) Marcus Pasell
[926469d] Fix new table styling (#1958) Kyle Shanks
[7236aa4] Update favorites page table columns, update reorderable table title and artist cursor, and display tooltips for table headers (#1956) Kyle Shanks
[e410fed] Implement small UI tweaks (#1952) Raymond Jacobson
[6f92aad] Apply accessbility patch for ios16 and xcode14 (#1951) Raymond Jacobson
[ced5749] Fix native profile render (#1945) Dylan Jeffers
[e6a3d87] Fix hover state for the new tables (#1953) Kyle Shanks
[6746e80] [PAY-428] Wrap link text in notifications (#1948) Reed
[f54f07e] Fix feed filter native c-1115 (#1947) nicoback2
[09a7e96] Upload sourcemaps for prod and release-candidate (#1946) Sebastian Klingler
[9cd2b89] [PAY-565] TokenValueInputV2 Component (#1869) Marcus Pasell
[2242786] Use artwork from track for MusicControl (#1943) Sebastian Klingler
[ed84022] [C-1067] Add feature flag for offline mode (#1941) Andrew Mendelsohn
[87f1082] send amplitude event when app crahses (#1942) nicoback2
[dc5c393] Disable gesture on AddToPlaylist drawer (#1944) Sebastian Klingler
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants