Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine each group of 3 consecutive segments in the raw transcript #998

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

robertknight
Copy link
Member

Segments in typical YouTube transcripts are very short. Grouping them can improve readability, at the cost of making it less precise which part of the transcript corresponds to the current video position. As an initial iteration of grouping, just combine every 3 segments together.

Ideally it might be nice to have segments be tidy linguistic units such as sentences, but auto-generated YouTube transcripts often do not contain the information to do this.

I also adjusted the layout to justify text and add padding to segments to avoid them being covered by buckets from the client's bucket bar.

Part of #955.


Before:

Ungrouped segments

After:

Grouped segments

Segments in typical YouTube transcripts are very short. Grouping them can
improve readability, at the cost of making it less precise which part of the
transcript corresponds to the current video position. As an initial iteration
of grouping, just combine every 3 segments together.

Ideally it might be nice to have segments be tidy linguistic units such as
sentences, but auto-generated YouTube transcripts often do not contain the
information to do this.

Part of #955.
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.
@robertknight robertknight requested a review from lyzadanger June 19, 2023 11:41
Copy link
Contributor

@lyzadanger lyzadanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

'text-stone-800': isCurrent,
})}
className={classnames(
'grow text-justify peer-hover:text-stone-900',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a task in #953 to do styling work around the buckets: that's still an open task. This is fine for now, however.

@robertknight robertknight merged commit aba450b into main Jun 20, 2023
@robertknight robertknight deleted the group-segments branch June 20, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants