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

Individual Transcript Page #52

Conversation

0tuedon
Copy link
Collaborator

@0tuedon 0tuedon commented Oct 29, 2024

This PR will close #50

Transcript MetaCard

  • Field Mapping:
  • Special Handling for "Transcript by" Field:
  • Clickable Tags:

Table of Contents

  • Replicate the table of contents functionality from the Explore page for consistent navigation.
  • The individual transcript page includes three content tabs
Transcript Tab
  • Use markdown for rendering transcript content. Apply pattern matching to format speaker attributions (bold text) and timestamps (distinct font) using the pattern "Speaker: HH:MM:SS" followed by a newline.
  • Media Display:
  • Summary Tab
  • Extra Info Tab

issue:

  • Empty Navigation panel
  • Styling for timestamped speakers
  • Scrolling on transcript content
  • Chapter Navigation
  • update color on chapters navigation

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 10:29pm

@Emmanuel-Develops
Copy link
Collaborator

Emmanuel-Develops commented Nov 4, 2024

Looks good!!

UI/UX Review

issue: Empty Navigation panel

description: The navigation panel should not render when a transcript doesn't have chapters. It should still occupy the spacing.
screenshot: see red bounding box

issue: Styling for timestamped speakers

description: There's no styling for speakers with timestamps. You mentioned working on this, is this a blocker?
screenshot: see green bounding boxes

issue: Scrolling on transcript content

description: There is a scroll on transcript content, is this what we want? I assume it should be a full page scroll depending on the transcript height. And if it is scrollable then it should not scroll more than the page itself i.e we shouldn't have two scrollbars — one on the page and the other on transcript tab.
cc: @kouloumos @aassoiants
screenshot: see blue bounding box

This screenshot applies to the 3 issues above
Screenshot 2024-11-04 at 2 02 33 PM
Link to replicate: https://registry-oyrpebo5x-btc-knowledge-base.vercel.app/stephan-livera-podcast/slp455-anant-tapadia-single-sig-or-multi-sig

issue: Chapter Navigation

description:

  • Chapter navigation needs more distinct spacing across its chapter list.
  • Reduce line height for wrapping texts
  • A bit different from what we have in Figma but increased font weight will help. Compare with font weight for the navigation component used in the categories page.
Screenshot 2024-11-04 at 1 45 42 PM

cc: @0tuedon

@0tuedon
Copy link
Collaborator Author

0tuedon commented Nov 4, 2024

issue: Styling for timestamped speakers

description: There's no styling for speakers with timestamps. You mentioned working on this, is this a blocker? screenshot: see green bounding boxes

I think this is just a regex failure will check

Screenshot 2024-11-04 at 14 46 57

@kouloumos kouloumos linked an issue Nov 5, 2024 that may be closed by this pull request
@kouloumos
Copy link
Member

I think this is just a regex failure will check

Unfortunately, we have transcripts that may not follow our pattern for speaker attribution. We don't need to support them, it's okay if we don't have this type of highlighting for them. As soon as we have this working we will change the transcripts so that they follow the same format for speakers attribution.

@Emmanuel-Develops
Copy link
Collaborator

Screenshot 2024-11-21 at 8 35 52 PM

This link isn't clickable
cc: @0tuedon

@Emmanuel-Develops
Copy link
Collaborator

There's a glitch on chapter navigation

chapter_navigation_glitch_trim2.mp4

cc: @0tuedon

Copy link
Member

@kouloumos kouloumos left a comment

Choose a reason for hiding this comment

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

Page looks good!

I left quite a few comments regarding implementation details and code readability and maintainability.

Additionally, it seems to me that the current chapter navigation might slow down the page loading, but I'll have to do better analysis in order to verify, not blocking tho.

src/app/transcript/[...slug]/page.tsx Outdated Show resolved Hide resolved
return notFound();
}

let data: any = allSources;
Copy link
Member

Choose a reason for hiding this comment

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

is there a type for this? we shouldn't use any. Also, more descriptive names help everybody. "data" is too generic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a really tricky issue, i did try to create some types that didn't end up working as perfect as we would want it.
Issues mainly occurred on this line

data = data[crumb as keyof typeof allSources];

Also, name change will be on the next commit

src/app/transcript/[...slug]/page.tsx Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

it looks to be that the BreadCrumbs should be using BaseBreadCrumbs instead of having duplicate code.

btw, "breadcrumbs" is one word, so it should be "Breadcrumbs"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it looks to be that the BreadCrumbs should be using BaseBreadCrumbs instead of having duplicate code.

Yh, I and Emma didn't do a refactor there just because we wanted to get it out, regardless it will be in my next commit.

btw, "breadcrumbs" is one word, so it should be "Breadcrumbs";

Actually both are correct, it could be breadcrumbs or bread crumbs.

src/utils/index.ts Outdated Show resolved Hide resolved
Comment on lines +99 to +107
export function createContentSlug(name: string): string {
return name
.toLowerCase()
.replace(/\s+/g, "-") // Replace spaces with hyphens
.replace(/[^\p{L}\p{N}\-_]+/giu, "") // Remove all non-alphanumeric characters except hyphen
.replace(/\-\-+/g, "-") // Replace multiple hyphens with a single hyphen
.replace(/^-+/, "") // Trim hyphens from the start
.replace(/-+$/, ""); // Trim hyphens from the end
}
Copy link
Member

Choose a reason for hiding this comment

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

this method looks the same as createSlug above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are different, and the reason for this was our language issue.

createSlug is being used in a lot of place and I did not want to change the implementation of our createSlug since it works where it's being used

This regex /[^\p{L}\p{N}\-_]+/giu will leave characters like "α" and other languages character. that's the difference between the two.

src/components/common/ContentSwitch.tsx Outdated Show resolved Hide resolved
contentlayer.config.ts Outdated Show resolved Hide resolved
contentlayer.config.ts Outdated Show resolved Hide resolved
@Emmanuel-Develops
Copy link
Collaborator

@kouloumos can you review the latest changes regarding code readability and maintainability

@Emmanuel-Develops
Copy link
Collaborator

@0tuedon please resolve conflicts

@Emmanuel-Develops Emmanuel-Develops merged commit 52c8937 into bitcointranscripts:staging Nov 29, 2024
2 checks passed
Emmanuel-Develops added a commit that referenced this pull request Nov 29, 2024
* refactor setup algorithm

* chore: remove slug from transcript card

* feat: Individual transcript page render

* feat: icons and  tab functionality

* feat: individual transcript page functionality

* fix: markdown # headings

* fix: spacing between link and design nit

* feat: Individual transcript page render

* feat: icons and  tab functionality

* feat: individual transcript page functionality

* fix: markdown # headings

* fix: h1,h2 check and code tag adjustment

* chore(version): updated bitcoin-dev-project version

* fix(refactor): code readbility

---------

Co-authored-by: IgboPharaoh <[email protected]>
Co-authored-by: Emmanuel Itakpe <[email protected]>
Emmanuel-Develops added a commit that referenced this pull request Nov 29, 2024
* Refactor: source data structure to account for languages and metadata (#57)

* Add boss banner (#63)

* chore: add source to transcript card (#60)

* Individual Transcript Page (#52)

Co-authored-by: 0tuedon <[email protected]>
Co-authored-by: IgboPharaoh <[email protected]>
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.

Individual Transcript Page
4 participants