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

Add Parental Controls #1456

Merged
merged 42 commits into from
Jun 21, 2022

Conversation

ChunkyProgrammer
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer commented Jun 25, 2021


Add Parental Controls

Important note
Please note that only PrestoN is able to merge Pull Requests into master.

Pull Request Type
Please select what type of pull request this is:

  • Bugfix
  • Feature Implementation

Related issue
closes #1418
#1086

Description
This PR will allow the following options for parental control:

  • Hide comments
  • Hide video description
  • Hide share button
  • Hide unsubscribe button
  • Hide live streams
  • Hide search bar
  • Only show Family Friendly videos/channels

I think seperate PRs would probably be better for the following Parental Control additions (let me know if I should include any in this PR):

  • Password protect settings/app
  • Encrypt local files (settings, profiles, history)
  • Whitelist unblocking (videos, playlists, channels)
  • Blacklist blocking (videos, playlists, channels, keywords)

More PRs can also tackle the following:

  • Watchtime control / number of videos to watch per day
  • Always asking for passwords when opening the app
  • Disabling links ( ex: local api comments)
  • Disabling certain video categories (ie. Disable all categories but Education & How-To)
  • YouTube kids extractor
  • Hide error messages

Screenshots (if appropriate)
image
image

Testing (for code that is not small enough to be easily understandable)

  • Hide Description::
    • Enable Hide Description
    • Navigate to a video
    • Don't see description
  • Hide Live Streams
    • Go to search
    • Search "Lofi"
    • See Lofi Girl
    • Enable "Hide Live Streams"
    • Go to Privacy Settings
    • Click "Clear Search Cache"
    • Search "Lofi"
    • Don't see Lofi Girl
  • Hide Share
    • Navigate to trending page
    • click on 3 dot menu for a video, see share options
    • click on the video, see the share button
    • Enable "Hide Share"
    • Navigate to Trending Page
    • Click 3 dot menu on a video
    • Only see "Marked As Watched"
    • Click on a video
    • See share button is missing
    • Navigate to a playlist
    • See share is missing
  • Hide Comments
    • Go to a video
    • See "Load Comments" button at the bottom of the video
    • Enable "Hide Comments"
    • Go to a video
    • Don't see "Load Comments" button
  • Hide Search Bar
    • Enable it and search bar disappears
  • Hide Unsubscribe button
    • Navigate to a channel
    • See subscribe button
    • Navigate to a video
    • See subscribe button
    • Navigate to a playlist (i don't remember if playlist shows subscribe button or not)
    • See subscribe button
    • Enable "Hide Unsubscribe button"
    • Navigate to a channel
    • See no Subscribe Button
    • navigate to a video
    • See no Subscribe button
    • Navigate to a playlist
    • See no subscribe button
  • Show Family Friendly Only
    • Search "Fuck"
    • See results
    • Enable "Show Family Friendly Only"
    • Go to Privacy Settings
    • Click Clear Search Cache
    • Search "Fuck"
    • See no results
      This should also work for channels and videos deemed Family Friendly but i have not been able to confirm this (I believe that it may have worked at one point but this PR is so old that I don't remember lol)

Desktop (please complete the following information):

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.13.1

Additional context
Add any other context about the problem here.

  • There's no meta data for "isFamilyFriendly" on most pages (besides "watch" & "channel") so I added an age restricted component to display when a video or channel isn't family friendly & the toggle is selected (let me know if you can think of a better way of doing this)
    image
  • Search results can appear empty if only live videos are returned on the first page (maybe some sort of lazy loading of search results can be implemented as an option in the future?)

@ChunkyProgrammer
Copy link
Member Author

ChunkyProgrammer commented Jun 25, 2021

@GilgusMaximus I know you mentioned that you were willing to collab with someone on parental controls. I am curious what you think of this PR so far. I feel like some of the options being introduced can go into distraction free settings but if you think going into parental-control-settings would be better. Let me know

@efb4f5ff-1298-471a-8973-3d47447115dc

Is #1191 also related?

@ChunkyProgrammer
Copy link
Member Author

ChunkyProgrammer commented Jun 26, 2021

Is #1191 also related?

I think it would work better as a seperate PR so this one can be tested, reviewed & merged faster. Atm I plan on finishing this PR and getting it merged then I'll work on the blacklist. The blacklist will probably be very similar to the whitelist so I'll probably take a look at that as well (it shouldn't take too long to implement the whitelist once I finish the blacklist). Unless a dev thinks otherwise, I'll save that feature for a future PR

@ChunkyProgrammer ChunkyProgrammer marked this pull request as ready for review June 27, 2021 17:10
@ChunkyProgrammer ChunkyProgrammer marked this pull request as draft July 3, 2021 02:40
@ChunkyProgrammer ChunkyProgrammer marked this pull request as draft July 3, 2021 02:40
@GilgusMaximus
Copy link
Contributor

GilgusMaximus commented Jul 5, 2021

So, sorry for waiting so long for a response, I wasn't able to do anything for a week. Additionally, I am still unable to check any code, so sorry for delaying all the PRs.

I think it is a good idea to split the kids safety into 2 PR's as you suggested, with exactly this split. Because now we can test the UI hiding and then add the additional settings not related to UI.

My suggestion for the setting categories:

  • Hide comments: distraction free
  • Hide video description: distraction free
  • Hide share button: distraction free
  • Hide unsubscribe button: parental control, bc you need this as a normal user to manage everything easily
  • Hide live streams: distraction free
  • Hide search bar: parental controls, bc no normal user would disable the search bar, because then they cannot search anything anymore.
  • Only show Family Friendly videos/channels: parental controls, pretty obvious

In regards to the second PR with the other settings, some comments:

  • Password protect settings/app -> A great addition for this would be a complete overhaul of the settings page, as things are getting packed in there. Because moving each category into one page would make asking for the password on certain pages easier. So children can still change colors and stuff, but not network related things, parental controls and distraction free settings.
  • Encrypt local files (settings, profiles, history) - Here we have to find a way to encrypt and decrypt the data without asking for a password all the time.
  • Whitelist blocking (videos, playlists, channels)
  • Blacklist blocking (videos, playlists, channels, keywords) - these also close other PR's, which asked for this.

So far everything looks good.

Some feature ideas one can add later would be things like watchtime control / number of videos to watch per day, always asking for passwords when opening the app, disabling links etc...

@efb4f5ff-1298-471a-8973-3d47447115dc

Hi @ChunkyProgrammer, i know ur assigned to #95 but I'm just asking to be sure. Is #95 related?

@ChunkyProgrammer
Copy link
Member Author

Hi @ChunkyProgrammer, i know ur assigned to #95 but I'm just asking to be sure. Is #95 related?

Yeah, it'll be included in the next PR

@ChunkyProgrammer ChunkyProgrammer marked this pull request as ready for review July 24, 2021 14:28
@peepo5
Copy link
Contributor

peepo5 commented Sep 5, 2021

Hi, what is the progress with this?

@ChunkyProgrammer
Copy link
Member Author

Hi, what is the progress with this?

Waiting for feedback/review

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

PikachuEXE
PikachuEXE previously approved these changes Jun 16, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Jun 19, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc

@absidue could u review this when u have time :) we need one moreeee

},

restrictedMessage: function () {
const contentType = this.$('Age Restricted.Type.' + this.contentTypeString)
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the error occurring here
error

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jun 20, 2022
@PrestonN PrestonN merged commit 3321fa9 into FreeTubeApp:development Jun 21, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 21, 2022
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jun 23, 2022
…uilds/build-more-versions

* commit '4f4f727ae1af304ce3131f03b29383ce4fdbb724': (104 commits)
  Translated using Weblate (Italian)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Arabic)
  Translated using Weblate (Polish)
  Translated using Weblate (Ukrainian)
  Translated using Weblate (French)
  Translated using Weblate (French)
  Translated using Weblate (Turkish)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Chinese (Simplified))
  Translated using Weblate (Turkish)
  Translated using Weblate (French)
  Add Parental Controls (FreeTubeApp#1456)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Chinese (Simplified))
  Make installation method and API method mandatory in bug issue template (FreeTubeApp#2342)
  Fix removing the meta files when navigating to a new video (FreeTubeApp#2344)
  * Update app menu to add item for new window (FreeTubeApp#2306)
  Update electron-builder version to ^23.0.2 (FreeTubeApp#2305)
  ...
@Joshndroid
Copy link

Is this currently merged or still not quite? Kinda confused. With a fresh download I am unable to see the Parental controls as yet in the settings.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Jul 25, 2022

Is this currently merged or still not quite? Kinda confused. With a fresh download I am unable to see the Parental controls as yet in the settings.

@Joshndroid
What did u download?

@Joshndroid
Copy link

Is this currently merged or still not quite? Kinda confused. With a fresh download I am unable to see the Parental controls as yet in the settings.

@Joshndroid What did u download?

I use this as a flatpak on my linux machine and dont see it
I also just did a fresh windows exe download and clicked through each settings menu and dont see it either.

@absidue
Copy link
Member

absidue commented Jul 25, 2022

@Joshndroid Which version did you download?

@Joshndroid
Copy link

my flatpak is v0.16.0 Beta
the windows is the same

@absidue
Copy link
Member

absidue commented Jul 25, 2022

@Joshndroid No wonder you aren't seeing it, 0.16.0 was released in February, this was merged in June. You need to download a nightly build of the development branch. There is no flatpack nightly so you will need to use one of the other installation methods on Linux. If you are happy dealing with potentially buggy experimental versions, you can download the latest nightly for the development branch here.

@Joshndroid
Copy link

perfect che

@Joshndroid No wonder you aren't seeing it, 0.16.0 was released in February, this was merged in June. You need to download a nightly build of the development branch. There is no flatpack nightly so you will need to use one of the other installation methods on Linux. If you are happy dealing with potentially buggy experimental versions, you can download the latest nightly for the development branch here.

perfect thanks @absidue

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.

Add a option to disable comments
9 participants