fix(frontend): stop long voice-model badge overflowing episode profile card - #1259
Open
Msparihar wants to merge 1 commit into
Open
fix(frontend): stop long voice-model badge overflowing episode profile card#1259Msparihar wants to merge 1 commit into
Msparihar wants to merge 1 commit into
Conversation
Let the speaker-profile row wrap and constrain the voice-model badge (min-w-0, max-w-full, truncate with a title tooltip) so long provider/model names no longer clip past the card edge. Fixes lfnovo#1196
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.
Fixes #1196
On the episode profile card (Podcasts -> Templates), a long
provider / modelvoice-model name clipped past the right edge of the card. The speaker-profile row was a single-lineflex items-centerwith no wrap, and the Badge component's base classes (w-fit whitespace-nowrap shrink-0) gave the text nowhere to go.Changes, following the fix suggested in the issue:
flex-wrapon the row so the badge can drop to its own line;shrink-0on the icon.min-w-0 max-w-full shrinkon the badge and atruncatespan inside it, so a name longer than the card width ellipsizes instead of overflowing. The inner span is needed becausetext-overflowdoes not apply to aninline-flexcontainer's anonymous text child.titleattribute on the badge so the full model id is available on hover.modelNameMaplookup into avoiceModelLabelconst.Validation:
npm run lint: 0 errors (7 pre-existing warnings in unrelated files)npm run test: 140 passed (23 files)npm run build: succeeds