Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
db4b49f
Implement user playlist grid view
kommunarr Apr 12, 2024
1b65a7c
Update to use listType setting for user playlist display type
kommunarr Apr 12, 2024
47e7dda
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 16, 2024
e46d897
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 17, 2024
8843c46
Implement styling fixes & adjustments
kommunarr Apr 17, 2024
5cabcc2
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 17, 2024
93e73db
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 17, 2024
8a89024
Update ft-refresh-widget to use fixed-top-bar mixin
kommunarr Apr 17, 2024
49c8165
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 18, 2024
c931596
Fix mixin
kommunarr Apr 18, 2024
0d8ce5c
Disable quick bookmark button on Quick Bookmark playlist
kommunarr Apr 18, 2024
7d2eec5
Fix isLoading artifact
kommunarr Apr 18, 2024
7e897e1
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 19, 2024
91f1e68
Implement missing Edit Mode properties for grid view
kommunarr Apr 21, 2024
a30687c
Make playlist title fixed height
kommunarr Apr 21, 2024
6684baf
Standardize gap between top bar and bottom section using CSS variable…
kommunarr Apr 21, 2024
70c8d30
Make effectiveListType computed property
kommunarr Apr 24, 2024
14f6036
Force list view on playlists for mobile devices
kommunarr Apr 24, 2024
1a47ec4
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 25, 2024
85503a6
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 2, 2024
c348a1a
Merge branch 'development' into feat/user-playlists-as-grid
kommunarr May 4, 2024
036712c
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 4, 2024
bc70bd0
Update to adjust height properly when playlist only has one item, not…
kommunarr May 4, 2024
ecc2866
Move is-side-nav-open and fixed-top-bar mixins to new partial file
kommunarr May 17, 2024
af1af9d
Add height threshold for forcing list view on playlist route
kommunarr May 19, 2024
a866963
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 20, 2024
63172c6
Make user playlist grid top section sticky, not fixed
kommunarr May 20, 2024
6faf21b
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add height threshold for forcing list view on playlist route
  • Loading branch information
kommunarr committed May 19, 2024
commit af1af9d5b58fe7dbc1884fb19c0f26ad69c18064
4 changes: 4 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ const MAIN_PROFILE_ID = 'allChannels'
// Width threshold in px at which we switch to using a more heavily altered view for mobile users
const MOBILE_WIDTH_THRESHOLD = 680

// Height threshold in px at which we switch to using a more heavily altered playlist view for mobile users
const PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD = 680

// YouTube search character limit is 100 characters
const SEARCH_CHAR_LIMIT = 100

Expand All @@ -88,5 +91,6 @@ export {
SyncEvents,
MAIN_PROFILE_ID,
MOBILE_WIDTH_THRESHOLD,
PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD,
SEARCH_CHAR_LIMIT
}
6 changes: 3 additions & 3 deletions src/renderer/views/Playlist/Playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
showToast,
} from '../../helpers/utils'
import { invidiousGetPlaylistInfo, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
import { MOBILE_WIDTH_THRESHOLD } from '../../../constants'
import { MOBILE_WIDTH_THRESHOLD, PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD } from '../../../constants'

const SORT_BY_VALUES = {
DateAddedNewest: 'date_added_descending',
Expand Down Expand Up @@ -292,7 +292,7 @@ export default defineComponent({
},
mounted: function () {
this.getPlaylistInfoDebounce()
this.forceListView = window.innerWidth <= MOBILE_WIDTH_THRESHOLD
this.handleResize()
window.addEventListener('resize', this.handleResize)
},
beforeDestroy: function () {
Expand Down Expand Up @@ -575,7 +575,7 @@ export default defineComponent({
},

handleResize: function () {
this.forceListView = window.innerWidth <= MOBILE_WIDTH_THRESHOLD
this.forceListView = window.innerWidth <= MOBILE_WIDTH_THRESHOLD || window.innerHeight <= PLAYLIST_HEIGHT_FORCE_LIST_THRESHOLD
},

getIconForSortPreference: (s) => getIconForSortPreference(s),
Expand Down