Skip to content
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

bug(YouTube - Settings): Copy-paste menu has a background layer #3061

Open
3 tasks done
ILoveOpenSourceApplications opened this issue Apr 21, 2024 · 9 comments
Open
3 tasks done
Labels
Bug report Something isn't working

Comments

@ILoveOpenSourceApplications

Bug description

When trying to either copy or paste something the menu for it is too large which ends up blocking what the user is trying to cut/copy/paste in the first place. This behavior is only present within the ReVanced settings menu only.

Screenshots & Screencaptures

Within Revanced Settings:

Screen_Recording_20240421_190609_YouTube.mp4
Screen_Recording_20240421_190634_YouTube.mp4

Screenshot_20240421_192827_YouTube

Within YouTube:
Screenshot_20240421_191811_YouTube
Screenshot_20240421_191758_YouTube

Error logs

No response

Solution

No response

Additional context

No response

Acknowledgements

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@ILoveOpenSourceApplications ILoveOpenSourceApplications added the Bug report Something isn't working label Apr 21, 2024
@ILoveOpenSourceApplications ILoveOpenSourceApplications changed the title bug (YouTube/ReVanced settings): Copy-paste menu is very large bug (YouTube/ReVanced settings): Copy-paste menu is too wide Apr 21, 2024
@ILoveOpenSourceApplications
Copy link
Author

Screenshot_20240421_191758_YouTube

In this image, copy-paste menu is white for some reason. Is it a bug due to the theme patch? I believe this mainly due to #2786.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Apr 21, 2024

Fixing this is tricky, because Android preferences are trash and horribly inflexible and finicky. When I first wrote this custom preference I tried different ways to fix this copy/paste layout sizing but couldn't come up with any fix.

But selecting text individually is not a common use case, and there is a 'copy' button at the bottom.

A more useful change, is to prevent the keyboard from showing when the import/export is opened. Because the user does not type text into this box, but instead copy/pastes everything (so typically the user never selects any text).

@ILoveOpenSourceApplications
Copy link
Author

I changed my theme to light mode when I read something about this being only there in dark mode. But the result is even weirder. There's an additional white box behind the default copy-paste menu, which is the culprit.
Screenshot_20240421_202623_YouTube

@ILoveOpenSourceApplications
Copy link
Author

Whatever that's creating a background layer of nothingness is the issue here. In dark mode, it just blends well with the menu and looks like a huge menu, while in reality it's an additional background box to the default copy-paste menu box.
Screenshot_20240421_203202_YouTube

@ILoveOpenSourceApplications
Copy link
Author

After searching around, I came across this question and an answer at the very bottom which isn't verified, but is it of any help?
https://stackoverflow.com/questions/39995735/how-to-change-the-background-of-context-menu-for-edittext

@ILoveOpenSourceApplications ILoveOpenSourceApplications changed the title bug (YouTube/ReVanced settings): Copy-paste menu is too wide bug (YouTube/ReVanced settings): Copy-paste menu has a background layer Apr 21, 2024
@LisoUseInAIKyrios
Copy link
Contributor

After searching around, I came across this question and an answer at the very bottom which isn't verified, but is it of any help? https://stackoverflow.com/questions/39995735/how-to-change-the-background-of-context-menu-for-edittext

Many of these solutions cannot be easily applied programmatically, since the style is a compiled xml file and integrations cannot access any of these files from the Patches project. Maybe changing the style xml file for YT itself would work, but that might be a bad idea and cause other strange issues.

I revisited trying different ways to force the keyboard not to show, but still could not prevent the keyboard from showing.

@ILoveOpenSourceApplications
Copy link
Author

The buffer icon for the About page is also having the background layer.
Screenshot_20240423_234526_YouTube

@ILoveOpenSourceApplications
Copy link
Author

@LisoUseInAIKyrios, does this comment from @inotia00 help?

He's also provided the commits in this comment.

@LisoUseInAIKyrios
Copy link
Contributor

Yes that works, and could be used to fix this.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug (YouTube/ReVanced settings): Copy-paste menu has a background layer bug(YouTube - Settings): Copy-paste menu has a background layer Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants