Skip to content

Channel subscribe button in search results #4376

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

Merged

Conversation

kommunarr
Copy link
Collaborator

@kommunarr kommunarr commented Nov 23, 2023

Channel subscribe button in search results (and minor improvements to grid & list views)

Pull Request Type

  • Bugfix
  • Feature Implementation

Related issue

closes #1968

Description

  • Adds subscribe button to channel in search results
  • Fixes ft-list-playlist not respecting appearance
  • Fixes hashtag and channel button click area to be full-width on grid and list view
  • Fixes list view being impossible to read video titles on smaller display sizes
  • Fixes hashtag, channel, video, and playlist search results to all be the same width on list view
  • Makes "videoCountContainer" on playlist item clickable to open the playlist

Video

This video completes the testing steps below:

simplescreenrecorder-2023-09-20_19.22.02-2023-11-23_08.26.28.mp4

Testing

  • Test list & grid view in search results, playlist page, and recommendations in desktop, tablet, and mobile view
  • Test that all list view search result types (hashtags, playlists, videos, channels) are all equal width, and that their click area width reflects that
  • Test that all grid view search results have full width click are
  • Test that you can click on the right-hand side of a playlist to open it
  • Test that subscribe button is present in search results involving channel

My search of choice for testing these: mafia channel. For hashtags: #meow.

Desktop

  • OS: OpenSUSE Tumbleweed
  • OS Version: 2023xxxx
  • FreeTube version: 0.19.1

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 23, 2023 14:40
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 23, 2023
@PikachuEXE
Copy link
Collaborator

I think it doesn't look great on low width view (like video at 1:05)
Using more vertical space is expected by low width view users

image

Otherwise works fine

@PikachuEXE
Copy link
Collaborator

The original list view for channel already got issue on low width (< 500px)
image

In this PR it becomes worse
image

@kommunarr
Copy link
Collaborator Author

@PikachuEXE What conditions are you seeing where the text is being clipped like in the image? Are you sure you don't just need to re-close and open dev tools?

Screenshot_20231123_200959

@kommunarr
Copy link
Collaborator Author

I think it doesn't look great on low width view (like video at 1:05) Using more vertical space is expected by low width view users

image

Otherwise works fine

I appreciate the feedback here. Do you have a suggestion on what it should look like?

@PikachuEXE
Copy link
Collaborator

Why would resizing the window reproduce a different result from using Toggle Device Toolbar
Anyway here is my WIP attempt (I rarely use grid even in FT)
(As on how to adjust the button style on tablet widths is up to you)
(I don't dare to change all ft-item style from flex to grid yet)

image
image

Replace whole style block starting with .ft-list-channel { in src/renderer/scss-partials/_ft-list-item.scss with

.ft-list-channel {
  &.grid {
    align-items: center;
    text-align: center;

    .info {
      margin-block-end: 12px;

      .infoLine {
        text-align: center;
      }
    }
  }

  &.list {
    align-items: start;
    display: grid;

    grid-template:
      'channelThumbnail info channelSubscribeButton'
      / auto 1fr auto;

    .channelThumbnail {
      grid-area: channelThumbnail;
    }

    .info {
      grid-area: info;
      align-content: start;
    }

    .channelSubscribeButton {
      grid-area: channelSubscribeButton;

      margin-block: auto;
      margin-inline: 7px;
    }

    @media only screen and (max-width: 1000px) {
      grid-template:
      'channelThumbnail info'
      'channelThumbnail channelSubscribeButton'
      / auto 1fr;
    }
  }
}

@kommunarr
Copy link
Collaborator Author

Hi Pika, sorry, to clarify, I meant what you were intending behaviorally, you didn't have to code anything up. Implemented your suggestions now in a least-changes manner. Also fixed issue with the channel icons not shrinking properly on smaller screen sizes.

Screenshot_20231124_083209
Screenshot_20231124_083140

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

It's a rare chance for me to learn grid

@FreeTubeBot FreeTubeBot merged commit 71addd2 into FreeTubeApp:development Nov 28, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 28, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Nov 29, 2023
* development: (38 commits)
  Channel subscribe button in search results (FreeTubeApp#4376)
  Translated using Weblate (Czech)
  Translated using Weblate (Portuguese (Brazil))
  Use F5 to refresh subscriptions (FreeTubeApp#4399)
  Miscellaneous improvements to settings page styling (FreeTubeApp#4235)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Swedish)
  Translated using Weblate (Arabic)
  Bump lefthook from 1.5.2 to 1.5.4 (FreeTubeApp#4398)
  Bump electron from 27.1.0 to 27.1.2 (FreeTubeApp#4395)
  Bump electron-builder from 24.6.4 to 24.9.1 (FreeTubeApp#4397)
  Translated using Weblate (Portuguese)
  Translated using Weblate (French)
  Fix bug (FreeTubeApp#4392)
  Translated using Weblate (Spanish)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Serbian)
  Translated using Weblate (Chinese (Simplified))
  Translated using Weblate (Italian)
  Cleanup SponsorBlock video id hashing (FreeTubeApp#4384)
  ...

# Conflicts:
#	src/renderer/scss-partials/_ft-list-item.scss
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.

"subscribe" option for channel within the search results
5 participants