Skip to content

Conversation

MarcaDian
Copy link
Contributor

@MarcaDian MarcaDian commented Sep 12, 2025

This PR changes the way search results are displayed. Instead of manipulating preferences (removing - adding), we use another overlay on top of the settings that shows search results.

This solves the problem of old preference APIs where adding/removing preferences breaks their listeners. (#5439 (comment)).

  • Refactored some utility methods and moved them to outer classes to avoid code duplication and enable reuse in other apps.

  • When searching for a disabled child setting, its parent setting is shown above it.

  • Tap on the path opens a screen containing this setting.

  • Long-press a search result to scroll directly to the setting.

  • Added slide_out_bottom animation to custom video quality and playback speed dialogs.

  • Search results are limited to 50 items.

  • Added search history screen instead of dropdown list.

  • Added "Search Tips" section to the search history screen to highlight some non-obvious features for the user.

  • Added an opacity slider in the SponsorBlock segment dialogs.

  • Added search function also to YouTube Music.


Screenshot_2025-09-12-20-58-43-135_app.revanced.android.youtube.jpg

Screenshot_2025-09-12-20-58-38-929_app.revanced.android.youtube.jpg

Screenshot_2025-09-12-20-58-58-601_app.revanced.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author

It seems to me that everything works as it should except for the highlighting of elements in lists.

Sometimes the old highlighting is kept.

I'll try to fix it somehow, but in my opinion it should be removed altogether.

@LisoUseInAIKyrios
Copy link
Contributor

Yes I think remove it. It's not important to highlight them.

@MarcaDian
Copy link
Contributor Author

Maybe fixed, but need test a bit.

@MarcaDian
Copy link
Contributor Author

The highlighting in the lists remained buggy, but I got tired of it.

If don't refuse to reboot or minimize the app with the list open, everything will be fine.

@LisoUseInAIKyrios
Copy link
Contributor

If it's buggy then remove the list preference highlighting. It's not a must have feature and it's only slightly useful.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title refactor(YouTube - Settings): Using an overlay to show search results fix(YouTube - Settings): Use an overlay to show search results Sep 13, 2025
@eyewill085-code

This comment was marked as spam.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 14, 2025

Maybe GitHub app is buggy

Screenshot_2025-09-14-11-36-45-031_com.github.android-edit.jpg

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Sep 14, 2025

The comment isn't visible because it's pending and hasn't been submitted yet (might be a review in progress).

Hmm, I think changing that will require clunky code fixes.

I think it's ok to show everything in the player menu. The user needs to make a more specific search.

@MarcaDian

This comment has been minimized.

@MarcaDian
Copy link
Contributor Author

Hmm, I think changing that will require clunky code fixes.\n\nI think it's ok to show everything in the player menu. The user needs to make a more specific search.

Then maybe we should increase or remove the limit for displaying results?
It's currently 50.
The log currently shows that ~330 preferences have been collected.

@LisoUseInAIKyrios
Copy link
Contributor

Showing 300 results isn't useful either. The user needs to make a more specific search.

But maybe bump up to 75 or maybe 100 if search is still fast.

# Conflicts:
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ForceOriginalAudioPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/LicenseActivityHook.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/preference/ReVancedPreferenceFragment.java
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt
@MarcaDian
Copy link
Contributor Author

Does the existing opacity setting also change the slider color opacity?

No, this only changes the background of the layout, but the brightness and volume sliders have 6-digit color, and 75% opacity is added programmatically.

@LisoUseInAIKyrios
Copy link
Contributor

If you think it could be useful, then add opacity to the control dialog.

change hide cast button to default true
@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios
Copy link
Contributor

@MarcaDian ready to merge? Everything seems ok now.

Any undiscovered small bugs can be fixed later.

@MarcaDian
Copy link
Contributor Author

From my side, it seems to be ready.

I wanted to try one more shot to transfer the SB settings in the patch, but probably not this time) it is very difficult and it should be done in the new PR, sometime in the future.

@LisoUseInAIKyrios
Copy link
Contributor

Maybe more of the SB settings can be added like the stats are, but otherwise I don't think it's worth it because there's too many settings that have unique syncing requirements.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 21, 2025

It seems there is some result)

Screenrecorder-2025-09-21-14-18-29-808.mp4

@LisoUseInAIKyrios
Copy link
Contributor

Is that with the latest here? I can't seem to reproduce the segment titles going wacky.

@MarcaDian
Copy link
Contributor Author

I probably didn't explain it correctly, continuing the discussion above, I'm trying to move SB settings to the patch, by analogy with stats and at first it works, along with this I changed all the strings to the new correct view (not _sum but _summary), but I forgot change it in the segments, so they are not displayed now.

This PR is ok for now.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit ece8076 into ReVanced:dev Sep 21, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Sep 21, 2025
## [5.40.1-dev.1](v5.40.0...v5.40.1-dev.1) (2025-09-21)

### Bug Fixes

* **YouTube - Return YouTube Dislike:** Do not show error toast if API returns 401 status ([#5949](#5949)) ([58d088a](58d088a))
* **YouTube - Settings:** Use an overlay to show search results ([#5806](#5806)) ([ece8076](ece8076))
@MarcaDian MarcaDian deleted the overlay-settings branch September 21, 2025 13:26
github-actions bot pushed a commit that referenced this pull request Sep 27, 2025
# [5.41.0](v5.40.0...v5.41.0) (2025-09-27)

### Bug Fixes

* **Instagram - Hide navigation buttons:** Remove button based on name ([#5971](#5971)) ([6fa4043](6fa4043))
* **Instagram - Limit feed to followed profiles:** Preserve favorites feed ([#5963](#5963)) ([ef51401](ef51401))
* **TikTok:** Show correct dialog restart text, use correct font color for non-dark mode ([d1a1293](d1a1293))
* **Twitch - Settings:** Fix missing style resources ([#5970](#5970)) ([8c22995](8c22995))
* **YouTube - Hide Shorts components:** Fix "Hide preview comment" ([#5990](#5990)) ([dd4e2cd](dd4e2cd))
* **YouTube - Return YouTube Dislike:** Do not show error toast if API returns 401 status ([#5949](#5949)) ([58d088a](58d088a))
* **YouTube - Settings:** Handle on screen back swipe gesture ([#6002](#6002)) ([6f92b6c](6f92b6c))
* **YouTube - Settings:** Use an overlay to show search results ([#5806](#5806)) ([ece8076](ece8076))
* **YouTube - SponsorBlock:** Show category color dot in voting dialog menu ([4be00d0](4be00d0))
* **YouTube - SponsorBlock:** Show category color in create new segment menu ([#5987](#5987)) ([ffd933c](ffd933c))
* **YouTube - Spoof video streams:** Update client side effects summary text ([a0a62dd](a0a62dd))

### Features

* **Tumblr:** Add `Disable Tumblr TV` patch ([#5959](#5959)) ([212418b](212418b))
* **YouTube - Hide layout components:** Add "Hide Emoji and Timestamp buttons" setting ([#5992](#5992)) ([2b555f6](2b555f6))
* **YouTube - Hide layout components:** Add "Hide view count" and "Hide upload time" settings ([#5983](#5983)) ([7a37d85](7a37d85))
* **YouTube - Loop video:** Add player button to change loop video state ([#5961](#5961)) ([dfb5407](dfb5407))
* **YouTube - Spoof app version:** Add spoof target `20.05.46` that fixes transcript functionality ([5823f0e](5823f0e))
* **YouTube Music:** Add `Check watch history domain name resolution` ([#5979](#5979)) ([8af70fe](8af70fe))
* **YouTube Music:** Add `Sanitize sharing links` patch ([#5952](#5952)) ([45c1ee8](45c1ee8))
* **YouTube Music:** Add `Theme` patch ([#5984](#5984)) ([3bd76d6](3bd76d6))
* **YouTube:** Add `Disable video codecs` patch ([#5981](#5981)) ([bfbffbd](bfbffbd))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants