Skip to content

Commit

Permalink
Add right padding to transcript segments and justify text
Browse files Browse the repository at this point in the history
Add right padding to prevent buckets from the client's bucket bar overlapping
the text, and justify to avoid ragged right edges in multi-line segments.
  • Loading branch information
robertknight committed Jun 20, 2023
1 parent a79b4c3 commit aba450b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions via/static/scripts/video_player/components/Transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,16 @@ function TranscriptSegment({
data-timestamp={timestamp}
/>
<p
className={classnames('grow peer-hover:text-stone-900', {
'text-stone-600': !isCurrent,
'text-stone-800': isCurrent,
})}
className={classnames(
'grow text-justify peer-hover:text-stone-900',
{
'text-stone-600': !isCurrent,
'text-stone-800': isCurrent,
},

// Avoid buckets overlapping highlighted text.
'pr-[30px]'
)}
data-testid="transcript-text"
ref={contentRef}
>
Expand Down

0 comments on commit aba450b

Please sign in to comment.