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

Show content metadata below the description #5946

Merged
merged 6 commits into from
Jun 3, 2021
Merged

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Mar 28, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR adds a metadata menu below the description of video, containing, in order:

  • category
  • tags (for this @wb9688 suggested to use Chips, but I'd rather not since there could be many tags and it would look bad) (@TiA4f8R after your links PR is merged the tags should be
  • licence
  • privacy
  • age limit (if != NO_AGE_LIMIT)
  • language
  • support info
  • host
  • thumbnail url (solves Add a thumbnail grabber #3724 and Allow viewing profile pics and thumbnails individually #4501 in a different way. Implementing a downloader or a custom image viewer just for a small amount of users does not seem like a good idea to me, but giving access to the thumbnail url at least enables them to view and download the image in the browser)

Each item is hidden if the corresponding value is null or empty.

This PR also disables text selection in the description by default, but adds a button to allow doing that. This fixes the strange flickering observed in #5453, see #5453 (comment) for more info.

Screenshot

Fixes the following issue(s)

APK testing

On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.

Due diligence

@triallax triallax added the feature request Issue is related to a feature in the app label Mar 29, 2021
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean!

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@AudricV AudricV changed the title Show video metadata below the decription Show content metadata below the description Mar 29, 2021
@AudricV AudricV added the multiservice Issues related to multiple services label Mar 29, 2021
@opusforlife2
Copy link
Collaborator

Killer feature! You're da MVP for the next blog post.

@Stypox
Copy link
Member Author

Stypox commented Apr 1, 2021

@TiA4f8R I fixed #5453 in this PR. See the screenshots and test the APK please ;-)

@AudricV
Copy link
Member

AudricV commented Apr 1, 2021

Very good, @Stypox. Just a few suggestions:

  • when you click on the button to enable description selection, you should be able to disable text selection. The text when long-pressing the button to enable the description selection should be something like Enable text description selection (and Disable text description selection if you add the ability to disable the description selection with this button)
  • copy metadata to clipboard should be made by long-pressing the tags, the category, etc. of the content, like for comments and may be not by clicking on the category of the metadata item because there is no indication that we can copy to clipboard a metadata item by clicking on this category.

@Stypox
Copy link
Member Author

Stypox commented Apr 1, 2021

Thumbnail URL @TobiGr

Done

you should be able to disable text selection

Done

copy metadata to clipboard should be made by long-pressing the tags

Done

maybe you can give chips a try and post a screenshot so we can see how it would look like? @TiA4f8R

Here are two screenshots. Chips turn out to look good when there are few (left), but I think they use up too much space when there are many (center). Maybe they could be made scrollable (right)? That would make reading them more cumbersome, though.

@AudricV
Copy link
Member

AudricV commented Apr 1, 2021

Making tags scrollable is a good idea and is similar to what the YouTube app does:

Screenshot_20210401_230448.jpg

I like this option, let's wait for what @opusforlife2 thinks.

@Stypox
Copy link
Member Author

Stypox commented Apr 1, 2021

@TiA4f8R yeah, but that's the case when the tags (i.e. the categories for YouTube app) are sorted by importance, so seeing the first ones is usually enough. But why would you only show the first ~4 tags and hide the other e.g. 15? I am not sure what the best idea is, but I agree the scrollable chip group looks good.

@peat80
Copy link

peat80 commented Apr 2, 2021

Or only show the first x entries to fit in a row and a "more / show all" button that can unfold the rest if there are more? 🤔

Btw. those chips look great and maybe should be used more through the app to make its look more eye catching... 😃👌

@opusforlife2
Copy link
Collaborator

Agreed. A 'more' button makes more sense. There could be possible scenarios where the tags take up just enough space that they fit without being cut off, unlike the screenshot. The user would never know that there are more tags that could be scrolled into view.

A 'more' button could expand the tags like in screenshot 1. Scrolling would be cumbersome, like Stypox says.

Plain no-scrolling is definitely bad, because many tags will take up space, and some people tend to tag indiscriminately. Gotta get that sweet, sweet SEO, of course.

@AudricV
Copy link
Member

AudricV commented May 20, 2021

These tags aren't available because we don't extract them in the extractor, if I am not wrong.

Clicking on chips opens the search fragment
Long clicking copies to clipboard
@Stypox
Copy link
Member Author

Stypox commented Jun 2, 2021

I'm (somewhat) back :-D.
I rebased and added the last changes, hopefully:

  • use chips for tags instead of a block of text
  • clicking on tags opens the search fragment
  • long clicking on tags copies to clipboard
  • tags are lexicographically sorted, otherwise they would be in random order each time a video is opened (YouTube does not provide them ordered).
  • use a scroll view to show many tags. At the end I went with this option: it looks good and feels natural. Tags are not that many, at the end of the day, so scrolling to the end usually takes just 1/2 scrolls, which is fine. My counterargument "yeah, but that's the case when the tags (i.e. the categories for YouTube app) are sorted by importance, so seeing the first ones is usually enough. But why would you only show the first ~4 tags and hide the other e.g. 15?" turns out not to be valid ;-).

See the image and tell me what you think :-) @B0pol @TobiGr @TiA4f8R @opusforlife2

@triallax
Copy link
Contributor

triallax commented Jun 2, 2021

@Stypox I tested it and it looks amazing! The only issue I see is the one @opusforlife2 mentioned:

There could be possible scenarios where the tags take up just enough space that they fit without being cut off, unlike the screenshot. The user would never know that there are more tags that could be scrolled into view.

I don't necessarily find this to be a blocker, but it would be nice if we could find a solution.

@opusforlife2
Copy link
Collaborator

Welcome back, @Stypox!

@mhmdanas Does the scroll bar always show if the tags don't fit in the given space? Or does it only become visible upon tapping or scrolling in that area? I'm thinking an easy visual cue is to permanently show the scroll bar for more tags. Then there would be no need for a More button.

@triallax
Copy link
Contributor

triallax commented Jun 2, 2021

@opusforlife2 no, it only becomes visible on scrolling (or tapping, didn't check).

@opusforlife2
Copy link
Collaborator

Then that's a possible solution. @Stypox thoughts?

@opusforlife2
Copy link
Collaborator

That thumbnail URL. If it's available like this maybe we could add more functionality on to it. Just the bare URL seems weird to simply show the user.

Maybe an option to Preview, Share or Download it?

@AudricV
Copy link
Member

AudricV commented Jun 2, 2021

Maybe an option to Preview, Share or Download it?

A separate PR would be better for this.

@opusforlife2
Copy link
Collaborator

Of course. I'm just floating the possibility.

@Stypox
Copy link
Member Author

Stypox commented Jun 2, 2021

I'm thinking an easy visual cue is to permanently show the scroll bar for more tags

Done. It looks natural, in my opinion

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you!

Edit: tested on tablet and phone emulator with API 30. Android Studio has a bug and I cannot create new emulators currently, so i cannot test this on KitKat, This should be done before merging.

@Stypox
Copy link
Member Author

Stypox commented Jun 3, 2021

@TobiGr I already tested on KitKat, everything seems to work as intended. Sorry, I forgot to mention it.

@TobiGr TobiGr merged commit 63c9308 into TeamNewPipe:dev Jun 3, 2021
@Stypox Stypox deleted the metadata branch June 4, 2021 10:33
This was referenced Jun 5, 2021
@SameenAhnaf SameenAhnaf mentioned this pull request Aug 3, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app multiservice Issues related to multiple services
Projects
None yet
6 participants