feat(player): scale episode title font size to its length (#81)#202
Merged
Conversation
The player rendered every episode title at a fixed 1.125rem, so long podcast titles dominated the player pane. Reduce the base to 1rem and ease the size down as the title grows (via a CSS clamp() fed by a --title-char-count custom property) toward a readable 0.875rem floor, so short titles stay comfortable and long ones stay contained. word-break: break-word remains the actual overflow backstop. Closes #81
Deploying podnotes with
|
| Latest commit: |
48aa075
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://826dceb8.podnotes.pages.dev |
| Branch Preview URL: | https://chhoumann-81-title-font-size.podnotes.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The player rendered every episode title at a fixed
1.125rem, so long podcast titles dominated the player pane (issue #81). This reduces the base size to1remand eases the title size down as the title grows, toward a readable0.875remfloor, so short titles stay comfortable and long ones stay contained.How it works
The episode title length feeds a
--title-char-countCSS custom property on the.podcast-titleheading, and the font size is aclamp():1rembase.0.875remfloor, reached around ~90 characters.--title-char-countis an approximate length signal (UTF-16 code units), so it only loosely tracks rendered width for non-Latin scripts. The existingword-break: break-wordremains the actual mechanism that keeps any title contained.Verification
Runtime checked in a real Obsidian instance (isolated worktree vault) with the production bundle. Measured computed
font-sizeon.podcast-title:The long title wrapped cleanly across lines, stayed centered, and did not overflow the pane.
Local gates (Node 22):
npm run lintpassnpm run format:checkpassnpm run typecheckpassnpm run check:a11ypass (0 errors, 0 warnings)npm run buildpassnpm run testpass (486 tests)(
docs:buildnot run: no user-facing docs impact for a visual sizing change.)Review
Reviewed with a multi-agent pass plus two adversarial reviewers on the opposing model. No correctness or accessibility blockers were found. Acted-on feedback: dropped the overstated "never overflow" wording in favor of an honest note that
word-breakis the containment backstop, removed a duplicate comment block, and kept the heading markup on a single line to match the rest of the file.Closes #81