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

Local API: Add support for home tab on channels #6033

Merged

Conversation

ChunkyProgrammer
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer commented Oct 30, 2024

Local API: Add support for home tab on channels

Pull Request Type

  • Feature Implementation

Description

This PR adds support for parsing the home page on channels

Screenshots

image
image
image
image

Testing

(Make sure to use Local API as primary API!)

  • go to a variety of different channels (ex: Linus Tech Tips, Music, - Topic channels)

  • make sure home page properly displays

  • try disabling channel homepage in distraction free settings

  • make sure that homepage is no longer visible

Desktop

  • OS: Linux Mint
  • OS Version: 22
  • FreeTube version: 0.22.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 30, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 30, 2024 05:08
@ChunkyProgrammer ChunkyProgrammer changed the title Add support for home tab Local API: Add support for home tab on channels Oct 30, 2024
@absidue
Copy link
Member

absidue commented Oct 30, 2024

How should we handle related/featured channels and game cards? Before this pull request they were shown on the about tab but now they are duplicated to the home page too. If we move them to the home page we need to make sure that the "Hide Feature Channels" setting still works.

@ChunkyProgrammer ChunkyProgrammer force-pushed the add-support-for-home-tab branch from e20d70b to 6b3aab2 Compare October 30, 2024 15:59
@ChunkyProgrammer
Copy link
Member Author

How should we handle related/featured channels and game cards? Before this pull request they were shown on the about tab but now they are duplicated to the home page too. If we move them to the home page we need to make sure that the "Hide Feature Channels" setting still works.

Good point, I think it's okay for the information to be duplicated on the home page as long as the code isn't duplicated (ex: we should set the featuredchannels as part of the home page parsing instead of having a separate method for parsing it).

I'll look into getting the hide featured channels to work with the homepage as well

@ChunkyProgrammer
Copy link
Member Author

Good point, I think it's okay for the information to be duplicated on the home page as long as the code isn't duplicated (ex: we should set the featuredchannels as part of the home page parsing instead of having a separate method for parsing it).

I'll look into getting the hide featured channels to work with the homepage as well

Done: 43aeeef

Copy link
Contributor

github-actions bot commented Nov 2, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Nov 2, 2024
@efb4f5ff-1298-471a-8973-3d47447115dc

Is it possible to hide shorts when the distraction free setting is enabled?

@ChunkyProgrammer
Copy link
Member Author

Is it possible to hide shorts when the distraction free setting is enabled?

I think it'd be possible to hide some of the shorts on the home page but not all of them (I'll have to double check).

Also, would we want to hide shorts on the home page? I thought the hide shorts setting was just for hiding the shorts tab?

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Conflicts have been resolved. A maintainer will review the pull request shortly.

@PikachuEXE
Copy link
Collaborator

Also, would we want to hide shorts on the home page? I thought the hide shorts setting was just for hiding the shorts tab?

I interpretation is that Hide Channel Shorts is for hiding any displayed shorts in single channel view & channel short tab is the only place before home tab is introduced

@ChunkyProgrammer ChunkyProgrammer added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 6, 2024
@efb4f5ff-1298-471a-8973-3d47447115dc

Also, would we want to hide shorts on the home page? I thought the hide shorts setting was just for hiding the shorts tab?

I interpretation is that Hide Channel Shorts is for hiding any displayed shorts in single channel view & channel short tab is the only place before home tab is introduced

Yeah maybe its best to just leave this as is

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

PikachuEXE
PikachuEXE previously approved these changes Nov 25, 2024
@absidue
Copy link
Member

absidue commented Nov 25, 2024

When visiting an artist topic channel such as https://www.youtube.com/channel/UCRw0x9_EfawqmgDI2IgQLLg I noticed that the home page is empty and the console contains warnings about an unknown lockup view type ALBUM. The data structure for that type seems to be the same as for playlists and podcasts, as it should just be a one line change to add that type to the switch-case, could you please do it as part of this pull requests? Everything else LGTM! :)

@ChunkyProgrammer
Copy link
Member Author

as it should just be a one line change to add that type to the switch-case, could you please do it as part of this pull requests? Everything else LGTM! :)

Updated

absidue
absidue previously approved these changes Nov 25, 2024
@PikachuEXE
Copy link
Collaborator

For special channel like https://www.youtube.com/channel/UCStaiwu-FAgp_RC_tBiLh9A I see video tab selected (even though home tab can be used)
Any reason?

@ChunkyProgrammer
Copy link
Member Author

For special channel like https://www.youtube.com/channel/UCStaiwu-FAgp_RC_tBiLh9A I see video tab selected (even though home tab can be used) Any reason?

Should be fixed now

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

Is this considered a bug? When navigating back to the channel Videos is highlighted but i expected Home to be highlighted after i disabled the distraction free toggle

VirtualBoxVM_CzWW95LiNM.mp4

@ChunkyProgrammer
Copy link
Member Author

@efb4f5ff-1298-471a-8973-3d47447115dc if you're going back to the channel then that wouldnt be a bug

@FreeTubeBot FreeTubeBot merged commit 719fcc0 into FreeTubeApp:development Dec 2, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 2, 2024
@ChunkyProgrammer ChunkyProgrammer deleted the add-support-for-home-tab branch December 2, 2024 23:21
Soham456 pushed a commit to Soham456/FreeTube that referenced this pull request Dec 5, 2024
* Add support for home tab on channels

* Remove some unneeded code

* Add setting to hide channel home tab

* Switch to Composition API

* Add Play All link when possible, parse more types

* fix typo for home tab aria-controls

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>

* move distraction free hide home setting

* Filter home data for setting featured channels

* fix publish date parsing

* Add support for shelf subtitle

* run lint-fix

* add jsdoc for added function

* implement code suggestions, fix lockupview

* add support for parsing subtitle and playlistId for richshelf

* exclude home tab for IV

* implement code suggestions, change `Play all` to `View playlist`

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* remove lockupview case since FreeTubeApp#6196 will handle parsing it in this function

* use list icon instead of bookmark icon

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* open all details by default

* add case 'ALBUM' for lockupView parsing

* change default page to home page when local api is enabled and home page isnt hidden when entering a channel url

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>
jlvivero pushed a commit to jlvivero/FreeTube that referenced this pull request Dec 7, 2024
* Add support for home tab on channels

* Remove some unneeded code

* Add setting to hide channel home tab

* Switch to Composition API

* Add Play All link when possible, parse more types

* fix typo for home tab aria-controls

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>

* move distraction free hide home setting

* Filter home data for setting featured channels

* fix publish date parsing

* Add support for shelf subtitle

* run lint-fix

* add jsdoc for added function

* implement code suggestions, fix lockupview

* add support for parsing subtitle and playlistId for richshelf

* exclude home tab for IV

* implement code suggestions, change `Play all` to `View playlist`

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* remove lockupview case since FreeTubeApp#6196 will handle parsing it in this function

* use list icon instead of bookmark icon

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* open all details by default

* add case 'ALBUM' for lockupView parsing

* change default page to home page when local api is enabled and home page isnt hidden when entering a channel url

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>
SuperAKWA pushed a commit to SuperAKWA/FreeTube that referenced this pull request Jan 24, 2025
* Add support for home tab on channels

* Remove some unneeded code

* Add setting to hide channel home tab

* Switch to Composition API

* Add Play All link when possible, parse more types

* fix typo for home tab aria-controls

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>

* move distraction free hide home setting

* Filter home data for setting featured channels

* fix publish date parsing

* Add support for shelf subtitle

* run lint-fix

* add jsdoc for added function

* implement code suggestions, fix lockupview

* add support for parsing subtitle and playlistId for richshelf

* exclude home tab for IV

* implement code suggestions, change `Play all` to `View playlist`

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* remove lockupview case since FreeTubeApp#6196 will handle parsing it in this function

* use list icon instead of bookmark icon

Co-Authored-By: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>

* open all details by default

* add case 'ALBUM' for lockupView parsing

* change default page to home page when local api is enabled and home page isnt hidden when entering a channel url

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <1018543+PikachuEXE@users.noreply.github.com>
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Feb 5, 2025

We forgot to hide the home tab when there is no content listed on it.

Go to any video
Load comments
Click on one of the profiles
See empty home tab

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.

5 participants