8000 feat(YouTube): Use modern style settings dialogs by MarcaDian · Pull Request #5109 · ReVanced/revanced-patches · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(YouTube): Use modern style settings dialogs #5109

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

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from

Conversation

MarcaDian
Copy link
Contributor
@MarcaDian MarcaDian commented Jun 4, 2025

Use modern style settings dialogs in accordance with YouTube's updated dialog design (#4409 (comment)).

TODO:

  • Implement modern dialog for import/export.
  • Implement modern dialog for ListPreferences (language, quality, speed)
  • Implement modern dialog for SB
  • Implement modern dialog for other dialogs (Check, GmsCore, Announcements)
  • Find a better solution to get the background/theme color

Screenshot_2025-06-06-14-22-15-450_app revancede android youtube
Screenshot_2025-06-06-14-22-01-237_app revancede android youtube
Screenshot_2025-06-06-13-57-38-485_app revancede android youtube
Screenshot_2025-06-06-13-56-33-084_app revancede android youtube
Screenshot_2025-06-06-13-56-28-878_app revancede android youtube
Screenshot_2025-06-06-13-56-20-304_app revancede android youtube
Screenshot_2025-06-06-13-56-15-825_app revancede android youtube
Screenshot_2025-06-06-13-53-41-160_app revancede android youtube

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat: Use modern dialog in settings feat: Use modern dialog style in settings Jun 4, 2025
@LisoUseInAIKyrios
Copy link
Contributor

I think there could be more padding between the dialog text and the title and buttons.

The "Do you wish to proceed" disclaimer text looks a little cramp.

@MarcaDian
Copy link
Contributor Author

I tried to use the same padding as in the original dialogs, but nothing is stopping us from setting our own.

@LisoUseInAIKyrios
Copy link
Contributor

I think the small padding works ok for the stock YT dialogs, since the dialog message is just one line.

I think the title might look better if the text is centered.

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 4, 2025

Import export dialog

Screenshot_2025-06-04-19-28-57-322_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author

I think the small padding works ok for the stock YT dialogs, since the dialog message is just one line.\n\nI think the title might look better if the text is centered.

Look at this

Screenshot_2025-06-04-19-55-03-482_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 4, 2025

Import export dialog

Not sure if the localized text will fit in the buttons, or if it's possible to show Cancel in the second row.

Screenshot_2025-06-04-20-03-09-062_app.revancede.android.youtube.jpg

@LisoUseInAIKyrios
Copy link
Contributor

I think the small padding works ok for the stock YT dialogs, since the dialog message is just one line.\n\nI think the title might look better if the text is centered.

Look at this

I think the dialog message text might be a little larger font. And maybe the title a little smaller font. Maybe there's a simple way to automatically reduce the title font if needed so it always fits on one line?

Otherwise looks good.

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 4, 2025

Now.

Screenshot_2025-06-04-20-39-46-177_app.revancede.android.youtube.jpg

Screenshot_2025-06-04-20-39-34-913_app.revancede.android.youtube.jpg

Screenshot_2025-06-04-20-39-40-805_app.revancede.android.youtube.jpg

@MarcaDian

This comment was marked as outdated.

@LisoUseInAIKyrios
Copy link
Contributor

Is two rows needed for localized languages that have long translations?

I think the one row looks a little better, but I know multiple rows may be needed since the stock dialog shows multiple rows if needed.

https://i.sstatic.net/qZchE.png

Could this behave the same as the stock dialog screenshot above, and show vertical buttons if the button text is too large otherwise always show horizontal (single row) buttons?

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 5, 2025

When the buttons are in 1 row, it seems to fit, because the font is smaller and has no caps.

In the standard Alertdialog, I always had problems with moving the buttons to a new row.

So I decided to play it safe. Maybe it makes sense to return 1 row, since the screenshots above show that there were no problems at the moment.

Or do "show vertical buttons if the button text is too large otherwise always show horizontal (single row) buttons"
(I already experimented with this, but for some reason I didn't add it now)

Screenshot_2025-06-05-11-20-38-670_app.revanced.android.youtube.jpg

@LisoUseInAIKyrios
Copy link
Contributor

If it fits on one line then always using one line is better. But some translations may have really long text so maybe the button text needs to automatically shrink if needed.

@MarcaDian
Copy link
Contributor Author

What about other dialogs (language, quality, speed)? It is also possible to change the style.

@LisoUseInAIKyrios
Copy link
Contributor

I think quality is the only one left?

Speed is already the new dialog. Language is a YT built in dialog, right?

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 5, 2025

I mean this (in settings).

Screenshot_2025-06-05-12-52-02-991_app.revanced.android.youtube.jpg

Screenshot_2025-06-05-12-51-37-409_app.revanced.android.youtube.jpg

@LisoUseInAIKyrios
Copy link
Contributor

Oh, there. Yeah can make a custom list preference if you want.

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 5, 2025

I can't find where the dialogs for quality, speed, language are created, it's definitely not Utils.showDialog (Or it is overwritten by the standard AlertDialog)

@LisoUseInAIKyrios
Copy link
Contributor

The dialog is created in the Android stock ListPreference class. Changing the dialog will require making a custom ListPreference class and using that as the default tag for ListPreference().

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat: Use modern dialog style in settings feat: Use modern style settings dialogs Jun 5, 2025
@Ushie
Copy link
Member
Ushie commented Jun 6, 2025

Maybe instead of official website, you can write revanced.app

And maybe use title case for the dialog? Checks Failed instead of Checks failed

@MarcaDian
Copy link
Contributor Author

Maybe instead of official website, you can write revanced.app

And maybe use title case for the dialog? Checks Failed instead of Checks failed

Since I don't know much English, I'll leave it to the devs to decide.

@MarcaDian MarcaDian marked this pull request as ready for review June 7, 2025 08:13
@MarcaDian
Copy link
Contributor Author

Last changes.

Screenshot_2025-06-07-11-14-29-201_app.revancede.android.youtube.jpg

Screenshot_2025-06-07-11-14-23-678_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 7, 2025

Also how to check Announcement if there are no messages?

@LisoUseInAIKyrios
Copy link
Contributor

For the color picker I think the buttons at the bottom (reset, cancel, ok) need more vertical padding between the manual color string edit text (#FF0033).

Not sure how or if the announcements can be force but maybe @oSumAtrIX has a suggestion.

@MarcaDian
Copy link
Contributor Author

Screenshot_2025-06-07-12-19-13-000_app.revancede.android.youtube.jpg

Screenshot_2025-06-07-12-19-01-193_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author

I think I replaced almost all the dialogues, only the dialogues left when creating the SB segments, which I'm not very interested in.

@Nuckyz
Copy link
Member
Nuckyz commented Jun 7, 2025

Is this entirely focused on YouTube or does it change any other apps too?

@MarcaDian
Copy link
Contributor Author
MarcaDian commented Jun 7, 2025

There are only 2 AlertDialog (excluding ListPreference) in TikTok, which I don't use on principle.

Anyone interested can integrate this.

@Nuckyz
Copy link
Member
Nuckyz commented Jun 7, 2025

There are only 2 AlertDialog (excluding ListPreference) in TikTok, which I don't use on principle.

Anyone interested can integrate this.

Just asking to update the PR title haha

@Nuckyz Nuckyz changed the title feat: Use modern style settings dialogs feat(Youtube): Use modern style settings dialogs Jun 7, 2025
@Nuckyz Nuckyz changed the title feat(Youtube): Use modern style settings dialogs feat(YouTube): Use modern style settings dialogs Jun 7, 2025
@MarcaDian
Copy link
Contributor Author

I think it's ready to review.

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
0