-
-
Notifications
You must be signed in to change notification settings - Fork 434
feat(YouTube - Settings): Add a color picker #4981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It may also be necessary to rework the color picker call, or perhaps display a toast to the user so that it is obvious that they need to click on the color dot to open the color picker. I tried to do everything in one dialog box, that is, both the color selection and the edittext, but there are some problems because the fragment extends EditTextPreference. |
# Conflicts: # extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/objects/SegmentCategoryListPreference.java
This comment was marked as resolved.
This comment was marked as resolved.
Is the touch color picker enabled? For the seekbar all I see is a text edit box with the color dot updated as the user types (similar to existing SB color picker). |
Need to tap on this color dot |
If possible, maybe put the color picker in the same dialog as the text edit? One less click. Or at a minimum, leave the color picker separate like it is now, but add a button to open the color picker. |
This comment was marked as resolved.
This comment was marked as resolved.
I wrote about this above.
If the problem with saving is resolved, I'll try again. |
Problem with saving seems to be fixed. |
How to notify the user about the color selection in the SB? Is it possible to show a toast? There is no place for a button there, but it is not intuitively clear that you need to click on the dot to open the color picker. |
If the color picker can be changed to a single dialog with the touch color and text box, then SB could remove the color string text box and replace it with a button to open the color picker ("change color" button) |
Or maybe somehow fit the color picker view into the same edit category dialog? The color view might need to be resized smaller, but if everything can fit on the category dialog (even if vertical scrolling is required) it would be easier to understand without going into a second dialog. |
This comment was marked as outdated.
This comment was marked as outdated.
Functionally that looks a lot better. Instead of overriding EditTextPreference, maybe override a regular Preference? If the class extends regular Preference, then add code to handle the Color preference to: Line 161 in 25e7dc1
Line 213 in 25e7dc1
Edit: since ColorPickerPreference is a shared class, instead just add code to the abstract preference fragment. |
In the video above I did that. And here is the result if still use EditTextPreference. Screenrecorder-2025-05-18-15-11-03-909.mp4 |
Need to fix Reset button and left ColorPicker preview
...y/src/main/java/app/revanced/extension/shared/settings/preference/ColorPickerPreference.java
Outdated
Show resolved
Hide resolved
1f971a8
to
5103bd8
Compare
I still can't initialize the color for the left rectangles, where the top one is the saved color and the bottom one is the current one. This may be due to UI rendering delays. |
...y/src/main/java/app/revanced/extension/shared/settings/preference/CustomColorPickerView.java
Outdated
Show resolved
Hide resolved
Yeah very strange why the preview color areas don't show. The draw rectangle is correct, and the colors are set correctly on the first call to |
Manually editing the text color string doesn't update the color preview or the color picker wheel cursor location. |
it is updated only when the correct color is entered in the format #FFFFFF, i.e. 6 letters or numbers. Sometimes looping still occurs when manually entering text. Perhaps a better solution would be to bring back to 2 dialog and simply add a color picker button. |
...y/src/main/java/app/revanced/extension/shared/settings/preference/CustomColorPickerView.java
Outdated
Show resolved
Hide resolved
…ome tweaking or figure out another other way to make the hue selector visible in day mode,
02d6dec
to
c3611e8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I think it's ready to merge? Offtop: My crappy code and professional edits from Liso resulted in a very useful feature for users 😅. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This solves the problem of white color dot being invisible in light theme.
# Conflicts: # extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java
Yes, seems ready to merge. Will merge tomorrow if there's no new issues by then. |
# [5.25.0](v5.24.0...v5.25.0) (2025-05-29) ### Bug Fixes * **Disable Pairip license check:** Change patch to default off ([74b6a94](74b6a94)) * **Hide ADB status:** Resolve app crash on startup ([#5029](#5029)) ([1abebd5](1abebd5)) * **Messenger:** Remove outdated `Disable switching emoji to sticker` patch ([#5044](#5044)) ([7b182ca](7b182ca)) * **Spotify Lite:** Remove obsolete `Enable on demand` patch ([#5046](#5046)) ([4886d47](4886d47)) * **YouTube - GmsCore support:** Restore patch functionality from prior merge ([7686bbe](7686bbe)) * **YouTube - Hide ads:** Hide new type of general ad ([#5004](#5004)) ([37e59d2](37e59d2)) * **YouTube - Open Shorts in regular player:** Do not exit app when pressing back button in regular player ([#5020](#5020)) ([3384f8d](3384f8d)) * **YouTube:** Better handle incorrect duplicate translations ([20abac5](20abac5)) * **Yuka - Unlock premium:** Remove broken patch that is no longer supported ([#5018](#5018)) ([fac6e59](fac6e59)) ### Features * Add `Disable pairip license check` patch ([#4927](#4927)) ([42d2c27](42d2c27)) * **Messenger:** Add `Remove Meta AI` patch ([#4945](#4945)) ([012dff7](012dff7)) * **Prime Video:** Add `Rename shared permissions` patch ([#5049](#5049)) ([80f1fc6](80f1fc6)) * **Spotify:** Add `Fix Facebook login` patch ([#5023](#5023)) ([34932dc](34932dc)) * **Threads:** Hide Ads ([#5064](#5064)) ([3c4cecb](3c4cecb)) * **YouTube - Enable debugging:** Add settings menu to share debug logs ([#5021](#5021)) ([1ec4a88](1ec4a88)) * **YouTube - Settings:** Add a color picker ([#4981](#4981)) ([1e0e398](1e0e398)) * **YouTube - Swipe controls:** Add separate color settings for the brightness and volume bars ([#5043](#5043)) ([80f50e8](80f50e8)) * **YouTube:** Add `Disable haptic feedback` patch ([#5033](#5033)) ([bbe7974](bbe7974))
Introduces a customizable color picker component to settings, allowing users to select interface colors directly within the app with live UI previews.
Part of code adapted from anddea/revanced-patches@bd0aa09