Skip to content

fix: Add scrollable content to modern style settings dialogs #5211

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

Merged
merged 10 commits into from
Jun 22, 2025

Conversation

MarcaDian
Copy link
Contributor

@MarcaDian MarcaDian commented Jun 20, 2025

This fix dialog layout to prevent buttons from being pushed off-screen.

If user has set a very large font, the content does not fit into the dialog, so the buttons may go off the screen.

Screenshot_2025-06-20-23-40-16-085_app.revancede.android.youtube.jpg

@MarcaDian MarcaDian changed the base branch from main to dev June 20, 2025 15:14
This fix dialog layout to prevent buttons from being pushed off-screen
@LisoUseInAIKyrios
Copy link
Contributor

Unrelated to this PR, but after using the new dialogs for a little while I think the AMOLED black dialog adjustment could be adjusted so the dialog background is closer to black. Maybe 5% brightness instead of 10% or whatever it is now. I think the dialog background looks a little too grey and could be closer to pure black (without being pure black).

YouTube

@MarcaDian
Copy link
Contributor Author

AMOLED black dialog adjustment could be adjusted so the dialog background is closer to black.

Actually, that's exactly what I wanted to do, but I guess overthought it a bit.
I think this can be changed in this PR.

This PR should be merged as soon as possible, because in the check dialog the buttons may be behind the screen, and it is impossible to click Ignore.
Although I haven't noticed any open issues yet.

@LisoUseInAIKyrios
Copy link
Contributor

I remember if the theme color is pure black, then it uses slightly off black for the dialogs so the dialog bounds are viewable?

I still think that is the correct behavior, but I think it should use a darker shade of black.

@MarcaDian
Copy link
Contributor Author

That's where this color is, just need to choose a darker one

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 20, 2025

Can try 0xFF050505 is 2%
0xFF080808 is 3%
0xFF0D0D0D is 5%

Screenshot_2025-06-20-22-55-15-264_com.embermitre.pixolor.app.jpg

Screenshot_2025-06-20-22-55-21-268_com.embermitre.pixolor.app.jpg

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 20, 2025

3% lighter

Screenshot_2025-06-20-23-29-20-239_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 20, 2025

I don't understand where the extra paragraph comes from.

Edit: This is probably because of the <p> tag in the string resource. Have to try this

<string name="revanced_check_environment_failed_message">
    <h5>This app does not appear to be patched by you.</h5><br>
    This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>
    These checks imply this app is pre-patched or obtained from someone else:<br><br>
    <small>%1$s</small><br>
    It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<br><br>
    If ignored, this warning will only be shown twice.
</string>

Screenshot_2025-06-20-23-38-55-317_app.revancede.android.youtube-edit.jpg

@LisoUseInAIKyrios
Copy link
Contributor

That dialog text is created from html converted to an Android span. It might be adding padding to match html behavior. Not sure.

Its too minor to worry about fixing it.

@LisoUseInAIKyrios
Copy link
Contributor

Can merge whenever this is ready.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 21, 2025

Wait a bit, I still need to add scrolling in some places (colorpicker, preferencelist), I'm testing now

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 21, 2025

Probably considered all the places where need to add a scrollview.

In the past PR I missed that the user can work in landscape orientation, or on TV, so when the content takes up a lot of space the buttons were still hidden (previously to avoid this I added a check for 60% of the height). Now everything is probably adapting as it should.

Screenshot_2025-06-21-12-04-35-795_app.revancede.android.youtube.jpg

Screenshot_2025-06-21-12-04-16-587_app.revancede.android.youtube.jpg

Screenshot_2025-06-21-12-03-25-541_app.revancede.android.youtube.jpg

Screenshot_2025-06-21-12-03-19-328_app.revancede.android.youtube.jpg

Screenshot_2025-06-21-12-03-16-769_app.revancede.android.youtube.jpg

Screenshot_2025-06-21-12-03-06-239_app.revancede.android.youtube.jpg

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 21, 2025

Unrelated to this PR, but if select ReVanced language, the dialog width limit is not applied, probably due to a problem with setContext.

Nevertheless, ready to merge.

Screenshot_2025-06-21-13-19-48-586_app.revancede.android.youtube.jpg

@LisoUseInAIKyrios
Copy link
Contributor

Will merge tomorrow if there's no further changes by then.

@ILoveOpenSourceApplications
Copy link
Contributor

The changes in this PR are exclusive towards ReVanced YouTube settings, right? So maybe change the PR title as well?

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Jun 22, 2025

No, the new modern dialogs are also present in other apps (Twitch), and this fix applies to them as well.

@LisoUseInAIKyrios
Copy link
Contributor

Ready to merge?

@MarcaDian
Copy link
Contributor Author

I think yes

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit e6876d5 into ReVanced:dev Jun 22, 2025
1 check passed
@MarcaDian MarcaDian deleted the fix-check-dialog branch June 22, 2025 11:23
github-actions bot pushed a commit that referenced this pull request Jun 22, 2025
## [5.28.1-dev.1](v5.28.0...v5.28.1-dev.1) (2025-06-22)

### Bug Fixes

* Add scrollable content to modern style settings dialogs ([#5211](#5211)) ([e6876d5](e6876d5))
github-actions bot pushed a commit that referenced this pull request Jun 26, 2025
# [5.29.0](v5.28.0...v5.29.0) (2025-06-26)

### Bug Fixes

* Add scrollable content to modern style settings dialogs ([#5211](#5211)) ([e6876d5](e6876d5))
* **Google Photos:** Resolve startup crash for Android 5.0 devices ([0294533](0294533))
* **YouTube - Hide ads:** Hide new type of product ad in video description ([#5225](#5225)) ([1e2efad](1e2efad))
* **YouTube - Hide layout components:** Fix "Hide video description attributes" ([#5250](#5250)) ([2f22d45](2f22d45))
* **YouTube - Hide Shorts components:** Fix "Hide Use this sound button" ([#5233](#5233)) ([5d6ec9e](5d6ec9e))
* **YouTube - Hide Shorts components:** Fix "Hide Use this template button" ([#5249](#5249)) ([b399ecb](b399ecb))
* **YouTube:** Always use single threaded layout to resolve layout bugs in unpatched YouTube ([#5226](#5226)) ([1f539b1](1f539b1))
* **YouTube:** Fix refactoring app startup exception ([1b00c90](1b00c90))

### Features

* Add `Spoof app signature` patch ([#5158](#5158)) ([78b25aa](78b25aa))
* **Cricbuzz:** Add `Hide ads` patch ([#4998](#4998)) ([83ccfa8](83ccfa8))
* **Crunchyroll:** Add `Hide ads` patch ([#5201](#5201)) ([46b4398](46b4398))
* **YouTube - Hide Shorts components:** Add `Hide Effects button` ([#5255](#5255)) ([240897a](240897a))
* **YouTube - Hide video action buttons:** Add `Hide Stop ads` ([#5245](#5245)) ([274dcc6](274dcc6))
* **YouTube:** Add an option to disable toasts when changing default playback speed or quality ([#5230](#5230)) ([c68cde3](c68cde3))
* **YouTube:** Support version `20.13.41` ([#5253](#5253)) ([d284c3d](d284c3d))
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.

3 participants