diff --git a/assets/images/logo/logo.pdn b/assets/images/logo/logo.pdn index 3baa42a58f..e944f8a334 100644 Binary files a/assets/images/logo/logo.pdn and b/assets/images/logo/logo.pdn differ diff --git a/assets/resources.json b/assets/resources.json index 31618a62d8..7b05e6f00a 100644 --- a/assets/resources.json +++ b/assets/resources.json @@ -1,5 +1,6 @@ { "css-above_queue_btns": "style/aboveQueueBtns.css", + "css-above_queue_btns_sticky": "style/aboveQueueBtnsSticky.css", "css-anchor_improvements": "style/anchorImprovements.css", "css-auto_like": "style/autoLike.css", "css-fix_hdr": "style/fixHDR.css", diff --git a/assets/style/aboveQueueBtns.css b/assets/style/aboveQueueBtns.css index 69ab8704fd..271dd25ed7 100644 --- a/assets/style/aboveQueueBtns.css +++ b/assets/style/aboveQueueBtns.css @@ -1,5 +1,4 @@ #side-panel ytmusic-tab-renderer ytmusic-queue-header-renderer { - position: sticky; align-items: center; top: 0; z-index: 2; diff --git a/assets/style/aboveQueueBtnsSticky.css b/assets/style/aboveQueueBtnsSticky.css new file mode 100644 index 0000000000..7d10f5ac41 --- /dev/null +++ b/assets/style/aboveQueueBtnsSticky.css @@ -0,0 +1,3 @@ +#side-panel ytmusic-tab-renderer ytmusic-queue-header-renderer { + position: sticky; +} diff --git a/changelog.md b/changelog.md index ea8699e9fb..71d5037591 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,25 @@
+ +## 2.2.1 +- **Changes:** + - The above-queue-button container's sticky positioning can now be turned off with a new advanced feature toggle in the config menu + + + + + +
+
+ ## 2.2.0 - **Changes:** diff --git a/src/config.ts b/src/config.ts index 329870f77f..11e1f38463 100644 --- a/src/config.ts +++ b/src/config.ts @@ -131,6 +131,10 @@ export const migrations: DataMigrationsDict = { // "autoLikePlayerBarToggleBtn", ]); }, + // 9 -> 10 (v2.2.1) + 10: (oldData: FeatureConfig) => useDefaultConfig(oldData, [ + "aboveQueueBtnsSticky", + ]), } as const satisfies DataMigrationsDict; /** Uses the default config as the base, then overwrites all values with the passed {@linkcode baseData}, then sets all passed {@linkcode resetKeys} to their default values */ diff --git a/src/features/index.ts b/src/features/index.ts index 1843707ecf..14a54d9d90 100644 --- a/src/features/index.ts +++ b/src/features/index.ts @@ -392,6 +392,13 @@ export const featInfo = { default: true, textAdornment: adornments.reload, }, + aboveQueueBtnsSticky: { + type: "toggle", + category: "songLists", + default: true, + advanced: true, + textAdornment: () => combineAdornments([adornments.advanced, adornments.reload]), + }, //#region cat:behavior disableBeforeUnloadPopup: { diff --git a/src/features/layout.ts b/src/features/layout.ts index d40c485985..582de36016 100644 --- a/src/features/layout.ts +++ b/src/features/layout.ts @@ -370,6 +370,8 @@ export async function initAboveQueueBtns() { if(!await addStyleFromResource("css-above_queue_btns")) error("Couldn't add CSS for above queue buttons"); + else if(getFeature("aboveQueueBtnsSticky")) + addStyleFromResource("css-above_queue_btns_sticky"); const contBtns = [ { diff --git a/src/types.ts b/src/types.ts index d977426099..2439bd2a41 100644 --- a/src/types.ts +++ b/src/types.ts @@ -563,6 +563,8 @@ export interface FeatureConfig { rememberSongTimeReduction: number; /** Minimum time in seconds the song needs to be played before it is remembered */ rememberSongTimeMinPlayTime: number; + /** Whether the above queue button container should use sticky positioning */ + aboveQueueBtnsSticky: boolean; //#region input /** Arrow keys skip forwards and backwards */