-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Improve image placeholders #8530
Conversation
What about using this material icon instead of creating a new SVG icon? This way we surely don't have styling problems, we don't have to maintain one more icon and we have a more standard look. |
I thought using of custom icon was intentional, this look better indeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is the file
dummy_thumbnail_dark.png
still used? Remove it otherwise - I would rename
buddy.xml
todummy_person.xml
- I think you have colors swapped for the video thumbnail and the playlist thumbnail:
- Even though you created different colors in
values-night
and then you used them in all placeholders, it doesn't seem to have worked, as the same image is shown regardless of the theme (light, dark or black)
405d23c
to
32af043
Compare
These are the same colors, I tested with a color picker, but the theme is "black" in the first image and "light" in the second. Also, the play arrow's left line does not seem to be completely straight:
I would remove I also renamed all of the placeholder images (also e.g. the channel banner) to |
LGTM, night mode colors worked for me though, at least on Android 10+. |
Yes, they do follow the device's night/day theme. But if you set the theme manually in NewPipe's settings, then it doesn't work anymore. |
- Show placeholders until the image is loaded because timeout can be very long and missing profile pictures and video thumbnails make app inconvenient to use - Adapt profile picture and video thumbnail placeholders to light theme - Replace profile picture and video thumbnail placeholders with vector graphics
Theme customization does not seem to work well with Picasso: square/picasso#1275
Did not think about it. |
After making the playlist and video thumbnails' scaleType fitCenter, the 24dp*24dp thumbnails would appear as a square, which would be strange, since the image view is 16:9.
55a83f4
to
9f993e0
Compare
0bf12be
to
9f993e0
Compare
555b40a
to
9f993e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then I am good with these changes. Thank you for the PR and the feedback :-D
Unfortunately, proper drawable resource can't be selected too due to Picasso bug, so I think we will have to use the same placeholders for both themes.
Maybe by looking more into it it is possible to find a solution, but I don't think it is so important as of now. Though, if you want to give it a try in a new PR, it would be accepted.
Kudos, SonarCloud Quality Gate passed! |
For reference, this behavior was initially requested in #5928 |
You mean this #5928 (comment)? |
Yes |
What is it?
Description of the changes in your PR
Currently, placeholders are shown instead of avatars or video previews only in case of an error during loading, including a timeout. This is not a good solution for a slow or unstable internet connection, or if the government blocks the domain with user avatars (
yt3.ggpht.com
) - the application waits for a very long time to load and in the end it will display the placeholder, but all this time on this place is empty, which makes it difficult to read comments and use the application as a whole.Also, the placeholders didn't display very nicely on high resolution screens, so I replaced them with vector ones based on the SVG originals from the assets directory. I adapted them to the light theme, as they don't look very consistent and don't fit very well.
Before/After Screenshots/Screen Record
+2 thousand views per minute
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence