Skip to content

Conversation

@Kyle-Shanks
Copy link
Contributor

Description

Updates to add a search screen param to autofocus the input and update the search screen to respect the param and focus the input automatically.

Interesting/hacky configuration to make sure that it focuses the first time, but not when a filter drawer is closed or when navigating back from results.

How Has This Been Tested?

Manually tested

@Kyle-Shanks Kyle-Shanks requested review from a team and sliptype July 24, 2024 16:30
@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2024

⚠️ No Changeset found

Latest commit: f8a46f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@sliptype sliptype left a comment

Choose a reason for hiding this comment

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

This seems good! I'm realizing I went down this same path yesterday to do the resetting of the filter scroll position whenever navigating to search from a track page. I ended up just using useFocusEffect and that allowed me to avoid having to add a search param: https://github.com/AudiusProject/audius-protocol/pull/9242/files

Idk if this is the exact same but might be worth trying to avoid the extra complexity

@Kyle-Shanks
Copy link
Contributor Author

This seems good! I'm realizing I went down this same path yesterday to do the resetting of the filter scroll position whenever navigating to search from a track page. I ended up just using useFocusEffect and that allowed me to avoid having to add a search param: https://github.com/AudiusProject/audius-protocol/pull/9242/files

Idk if this is the exact same but might be worth trying to avoid the extra complexity

Updated to use the useFocusEffect hook. Doesn't solve the need for the param unfortunately, but looks a little nicer

@Kyle-Shanks Kyle-Shanks enabled auto-merge (squash) July 24, 2024 18:21
@Kyle-Shanks Kyle-Shanks merged commit 89d1e76 into main Jul 24, 2024
@Kyle-Shanks Kyle-Shanks deleted the kj-Autofocus-input-when-navigating-to-search-screen branch July 24, 2024 18:33
audius-infra pushed a commit that referenced this pull request Jul 27, 2024
[bea9c85] Fix previously scheduled edit flow (#9278) Dylan Jeffers
[9468507] Improve mobile inner-form revert (#9277) Dylan Jeffers
[15ce2a7] [C-3251] Fix initial state for hidden price-audience field (#9276) Dylan Jeffers
[51a67b4] Fix runtime issue with advanced field (#9275) Dylan Jeffers
[09acfe3] [PAY-3265, PAY-3241] Disallow scheduled playlists in upload/edit; Fix mood placeholder (#9272) Andrew Mendelsohn
[65c886a] [C-4690] Wire up advanced search deep links (#9271) Sebastian Klingler
[deebd52] [C-4874] Update time to 11:59 when scheduling for same day (#9266) Andrew Mendelsohn
[cc407c6] Fix missing refactor bug (#9270) Saliou Diallo
[42e8d11] [PAY-3232] Fix hidden visibility bug when setting price and audience fields (#9268) Saliou Diallo
[523c341] Revert "Update models used in DN reposts endpoints" (#9269) Randy Schott
[89d1e76] [C-4840] Update search screen to auto focus the input (#9263) Kyle Shanks
[9e72dba] [C-4867] Fix collection release date timezone (#9267) Dylan Jeffers
[f5abafe] [C-4866] Fix edit collection form submit (#9262) Dylan Jeffers
[a834436] [PAY-3187] Fix messed up back button form state for payment settings (#9260) Raymond Jacobson
[c3c5b45] [PAY-3196][PAY-3230] Fix miscellaneous editable access issues on mobile (#9258) Saliou Diallo
[823bc63] [C-4793, C-4791] Don't favorite hidden album tracks on purchase (#9254) Andrew Mendelsohn
[6055711] [C-4863] Fix cascading publish on edit collection (#9249) Andrew Mendelsohn
[7500e91] [C-4634] Add popularity sort to users and collections (#9250) Dylan Jeffers
[cd24c79] [C-4843] [C-4846] More advanced search UI fixes (#9252) Sebastian Klingler
[d05de85] [C-4865] Make metadata links visible (#9248) Sebastian Klingler
[8ebbb9d] [C-4847] Reset search filters scroll position (#9242) Sebastian Klingler
[d43760d] PAY-3186 Fixes issue preventing edit screen from opening twice (#9247) Marcus Pasell
[7ffc65c] [C-4834] Animate clear search button for search v2 (#9246) Sebastian Klingler
[24ed1c6] [C-4860] Add waitlist hint for premium album (#9243) Dylan Jeffers
[b336657] Fix type error from SDK update (#9245) Randy Schott
[4fb3d7d] Fix same day scheduled release on web (#9240) Dylan Jeffers
[305a9ef] [PAY-3190] Improve profile page pull to refresh (#9241) Raymond Jacobson
[73a7131] [C-4841] Fix search v2 navigation on mobile (#9233) Sebastian Klingler
[df91fca] [C-4853] Mobile Edit Collection (#9237) Dylan Jeffers
[6473ab1] Update models used in DN reposts endpoints (#9228) Randy Schott
[2c09b40] [C-4792] Disallow Add To Playlist for hidden tracks (#9236) Andrew Mendelsohn
[11f5325] [PAY-3176][PAY-3188][PAY-3193] Include premium tracks in DN playlists for owner (#9234) Saliou Diallo
[f495382] Remove use_sdk_purchase_track and use_sdk_purchase_album feature flags (#9192) Marcus Pasell
[e45bdae] Remove use_sdk_tips feature flag (and fix indexing check) (#9193) Marcus Pasell
[8174034] [C-4832] Fix missing play counts on track tiles (#9230) Kyle Shanks
[20e739c] [QA-1442] Add offline indicator to collection card (#9227) Dylan Jeffers
[fc3648e] [QA-1463] Change order of mobile action buttons (#9229) Reed
[b7ea2fc] [C-4837] Fix links for the searching by electronic subgenre from track page (#9225) Kyle Shanks
[3bd33d4] [QA-1452] Fix edit playlist issues (#9226) Dylan Jeffers
[cedf459] [C-4848] Remove search v2 responsiveness and fix padding on mobile web (#9224) Sebastian Klingler
[e60706c] [C-4842] Fix tag press on mobile for search v2 (#9223) Kyle Shanks
[9e455f2] [C-4829] Fix mobile web drawer overflow (#9220) Dylan Jeffers
[e0af62a] [QA-1458] Fix artwork image loading (#9219) Dylan Jeffers
[4355378] Update dapp-store build artifacts audius-infra
[1aa1dd2] [QA-1455] Fix disappearing playlists in sidebar (#9216) Dylan Jeffers
[9a7ddbf] [C-4643] Feature flag scheduled premium album release (#9215) Dylan Jeffers
[dff2b2d] Bump mobile versions to 107 (#9218) Dylan Jeffers
[42611cb] [PAY-3177][PAY-3185] Fix mobile track publish button (#9213) Saliou Diallo
schottra added a commit that referenced this pull request Jul 29, 2024
* origin/main: (36 commits)
  [PAY-3265, PAY-3241] Disallow scheduled playlists in upload/edit; Fix mood placeholder (#9272)
  [C-4690] Wire up advanced search deep links (#9271)
  [C-4670] Fix track search with deleted premium stems (#9257)
  requery for audio analysis jobs every 15 min (#9265)
  [C-4874] Update time to 11:59 when scheduling for same day (#9266)
  Fix missing refactor bug (#9270)
  [PAY-3232] Fix hidden visibility bug when setting price and audience fields (#9268)
  Revert "Update models used in DN reposts endpoints" (#9269)
  [C-4840] Update search screen to auto focus the input (#9263)
  [C-4867] Fix collection release date timezone (#9267)
  [C-4866] Fix edit collection form submit (#9262)
  [PAY-3187] Fix messed up back button form state for payment settings (#9260)
  Upgrade vector to 0.39.0 (#9261)
  Move to all sha256 ordering (#9239)
  Audius Protocol v0.6.154
  placement hosts analyze legacy audio analyses in addition to storeall node (#9259)
  [PAY-3196][PAY-3230] Fix miscellaneous editable access issues on mobile (#9258)
  mediorum configurable num workers (#9256)
  [C-4793, C-4791] Don't favorite hidden album tracks on purchase (#9254)
  [C-4863] Fix cascading publish on edit collection (#9249)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants