Skip to content

Commit fdd34af

Browse files
author
ImprovedTube
authored
Merge pull request #3707 from Harshil7875/subscriptions-list-layout
Add list layout option for Subscriptions page
2 parents 9ce167e + fe20354 commit fdd34af

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

_locales/en/messages.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,9 @@
12381238
"removeSubscriptionsMostRelevant": {
12391239
"message": "Hide 'Most relevant' section on Subscriptions page"
12401240
},
1241+
"subscriptionsListLayout": {
1242+
"message": "List layout on Subscriptions page"
1243+
},
12411244
"RemoveSubtitlesForLyrics": {
12421245
"message": "Remove subtitles for lyrics"
12431246
},

js&css/extension/www.youtube.com/styles.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,4 +2295,51 @@ html[it-thumbnail-size="x-small"] ytd-compact-video-renderer ytd-thumbnail {
22952295
}
22962296
html[it-thumbnail-size="xx-small"] ytd-compact-video-renderer ytd-thumbnail {
22972297
width: 70px !important;
2298+
}
2299+
2300+
/*--------------------------------------------------------------
2301+
# SUBSCRIPTIONS LIST LAYOUT
2302+
--------------------------------------------------------------*/
2303+
/* Single-column grid */
2304+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-grid-renderer > #contents {
2305+
display: flex !important;
2306+
flex-direction: column !important;
2307+
gap: 12px !important;
2308+
}
2309+
2310+
/* Flatten row wrappers */
2311+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-grid-row {
2312+
display: contents !important;
2313+
}
2314+
2315+
/* Each video item: horizontal row */
2316+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-item-renderer {
2317+
width: 100% !important;
2318+
max-width: 100% !important;
2319+
margin: 0 !important;
2320+
}
2321+
2322+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-item-renderer #dismissible.ytd-rich-grid-media {
2323+
display: flex !important;
2324+
flex-direction: row !important;
2325+
gap: 16px !important;
2326+
}
2327+
2328+
/* Thumbnail fixed width on left */
2329+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-item-renderer #dismissible.ytd-rich-grid-media ytd-thumbnail {
2330+
min-width: 360px !important;
2331+
max-width: 360px !important;
2332+
flex-shrink: 0 !important;
2333+
}
2334+
2335+
/* Details fill remaining space on right */
2336+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-item-renderer #dismissible.ytd-rich-grid-media #details {
2337+
flex: 1 !important;
2338+
min-width: 0 !important;
2339+
padding-top: 4px !important;
2340+
}
2341+
2342+
/* Hide empty items */
2343+
html[it-subscriptions-list-layout="true"][it-pathname="/feed/subscriptions"] ytd-rich-item-renderer[is-empty] {
2344+
display: none !important;
22982345
}

menu/skeleton-parts/general.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ extension.skeleton.main.layers.section.general = {
101101
text: 'removeSubscriptionsMostRelevant',
102102
id: 'remove-subscriptions-most-relevant'
103103
},
104+
subscriptions_list_layout: {
105+
component: 'switch',
106+
text: 'subscriptionsListLayout',
107+
id: 'subscriptions-list-layout'
108+
},
104109
youtube_home_page: {
105110
component: 'select',
106111
text: 'youtubeHomePage',

0 commit comments

Comments
 (0)