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

Cleanup unused channel hiding code in ft-list-video-numbered #5208

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Jun 1, 2024

Cleanup unused channel hiding code in ft-list-video-numbered

Pull Request Type

  • Cleanup

Description

From what I could tell, we had a prop that allowed you to turn on channel hidding in the ft-list-video-numbered component, but it defaulted to false and in neither of the two places that we used the component, did we set that prop to true. So if it's not used, it doesn't seem worth keeping around. Initially I thought this would help with the performance problems experienced in #4578, but in my testing it didn't seem to make a difference, so I'm categorizing this pull request as a cleanup instead of a performance improvement.

<ft-list-video-numbered
v-for="(item, index) in playlistItems"
:key="item.playlistItemId || item.videoId"
:ref="currentVideoIndexZeroBased === index ? 'currentVideoItem' : null"
class="playlistItem"
:data="item"
:playlist-id="playlistId"
:playlist-type="playlistType"
:playlist-index="reversePlaylist ? playlistItems.length - index - 1 : index"
:playlist-item-id="item.playlistItemId"
:playlist-reverse="reversePlaylist"
:playlist-shuffle="shuffleEnabled"
:playlist-loop="loopEnabled"
:video-index="index"
:is-current-video="currentVideoIndexZeroBased === index"
appearance="watchPlaylistItem"
:initial-visible-state="index < (currentVideoIndexZeroBased + 4) && index > (currentVideoIndexZeroBased - 4)"
@pause-player="pausePlayer"
/>

<ft-list-video-numbered
v-for="(item, index) in visiblePlaylistItems"
:key="`${item.videoId}-${item.playlistItemId || index}`"
class="playlistItem"
:data="item"
:playlist-id="playlistId"
:playlist-type="infoSource"
:playlist-index="playlistInVideoSearchMode ? playlistItems.findIndex(i => i === item) : index"
:playlist-item-id="item.playlistItemId"
appearance="result"
:always-show-add-to-playlist-button="true"
:quick-bookmark-button-enabled="quickBookmarkButtonEnabled"
:can-move-video-up="index > 0 && !playlistInVideoSearchMode && isSortOrderCustom"
:can-move-video-down="index < playlistItems.length - 1 && !playlistInVideoSearchMode && isSortOrderCustom"
:can-remove-from-playlist="true"
:video-index="playlistInVideoSearchMode ? playlistItems.findIndex(i => i === item) : index"
:initial-visible-state="index < 10"
@move-video-up="moveVideoUp(item.videoId, item.playlistItemId)"
@move-video-down="moveVideoDown(item.videoId, item.playlistItemId)"
@remove-from-playlist="removeVideoFromPlaylist(item.videoId, item.playlistItemId)"
/>

Testing

Not sure what to put here for this pull request, maybe make sure that channels still aren't hidden inside playlists?

Desktop

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

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 1, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 1, 2024 21:55
@FreeTubeBot FreeTubeBot merged commit 048dab0 into FreeTubeApp:development Jun 1, 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 Jun 1, 2024
@absidue absidue deleted the video-numbered-cleanup branch June 1, 2024 23:41
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jun 3, 2024
* development: (36 commits)
  Remove unused database compacting IPC channel (FreeTubeApp#5212)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Portuguese)
  Translated using Weblate (Finnish)
  Compressed Images (FreeTubeApp#5209)
  Cleanup unused channel hiding code in ft-list-video-numbered (FreeTubeApp#5208)
  Translated using Weblate (Serbian)
  Hide recommendations from the Watch component, instead of hiding itself (FreeTubeApp#5203)
  Consolidate clear subscriptions cache into one mutation (FreeTubeApp#5202)
  Translated using Weblate (Spanish)
  Translated using Weblate (French)
  Translated using Weblate (German)
  Translated using Weblate (Polish)
  Translated using Weblate (Turkish)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Croatian)
  Store comment reply tokens separately to avoid reactivity (FreeTubeApp#5190)
  Translated using Weblate (Croatian)
  Translated using Weblate (German)
  Translated using Weblate (Czech)
  ...

# Conflicts:
#	src/datastores/handlers/base.js
#	src/renderer/store/modules/subscriptions.js
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