[PR #3842] [MERGED] Dynamically calculate episode row height on LazyEpisodeTable init #4098

Closed
opened 2026-04-25 00:18:18 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3842
Author: @mikiher
Created: 1/15/2025
Status: Merged
Merged: 1/15/2025
Merged by: @advplyr

Base: masterHead: dynamic-episode-row-height


📝 Commits (1)

  • e865241 Dynamically calculate episode row height on init

📊 Changes

1 file changed (+12 additions, -4 deletions)

View changed files

📝 client/components/tables/podcast/LazyEpisodesTable.vue (+12 -4)

📄 Description

Brief summary

Instead of using a fixed size for episodeRowHeight, it is given a default value but recalculated when the episode table is mounted.

Which issue is fixed?

This fixes #3511. While this is marked as related to #3013, I believe they're not actually related.

In-depth Description

The bug was reproduced by manually setting the root font-size to a larger value (I suspected that this might be reason, because the reporter mentioned system scale changes).

The original code hardcodes episodeRowHeight value to 176 px (which is indeed the row height when the root font size is the default 16px). episodeRowHeight is used to make scroll calculations to decide which episodes to mount, and when it is different from the actual value, it results in mounting incorrect episodes.

The fix determines episodeRowHeight from the actual dom element of the first episode (or from the "no-episodes" element, if no episodes exist), which fixes the issue above.

How have you tested this?

Used Chrome settings to change the root font-size value, and ensured scrolling worked OK after reloading the page.

note: this fix doesn't automatically react to changes in the root font-size - it only recalculates episodeRowHeight in the init() function. I can make it reactive, but it seems unnecessary, as this is not something that users play with frequently.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3842 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 1/15/2025 **Status:** ✅ Merged **Merged:** 1/15/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `dynamic-episode-row-height` --- ### 📝 Commits (1) - [`e865241`](https://github.com/advplyr/audiobookshelf/commit/e8652412589ad44f7c067beb8bc9adc3a02e04f8) Dynamically calculate episode row height on init ### 📊 Changes **1 file changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `client/components/tables/podcast/LazyEpisodesTable.vue` (+12 -4) </details> ### 📄 Description ## Brief summary Instead of using a fixed size for episodeRowHeight, it is given a default value but recalculated when the episode table is mounted. ## Which issue is fixed? This fixes #3511. While this is marked as related to #3013, I believe they're not actually related. ## In-depth Description The bug was reproduced by manually setting the root font-size to a larger value (I suspected that this might be reason, because the reporter mentioned system scale changes). The original code hardcodes episodeRowHeight value to 176 px (which is indeed the row height when the root font size is the default 16px). episodeRowHeight is used to make scroll calculations to decide which episodes to mount, and when it is different from the actual value, it results in mounting incorrect episodes. The fix determines episodeRowHeight from the actual dom element of the first episode (or from the "no-episodes" element, if no episodes exist), which fixes the issue above. ## How have you tested this? Used Chrome settings to change the root font-size value, and ensured scrolling worked OK after reloading the page. _note:_ this fix doesn't automatically react to changes in the root font-size - it only recalculates episodeRowHeight in the init() function. I can make it reactive, but it seems unnecessary, as this is not something that users play with frequently. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:18 +02:00
adam closed this issue 2026-04-25 00:18:18 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4098