Skip to content

Follow-up: improve nostr-post replies UX and rendering #92

Description

@coderabbitai

Summary

Follow up on the replies support merged via PR #72 to address three UX/rendering gaps in nostr-post replies:

  1. Reply skeleton loaders are stretched horizontally and do not resemble real reply text blocks.
  2. Replies are rendered all at once; they should be paginated in batches (initially 10) with a Show more control.
  3. Reply content is currently rendered as plain escaped text; rich text (links, images, embedded notes, etc.) should be processed similarly to the main post body.

Context

These items were called out after merging the initial replies support into nostr-post.

Requested changes

1) Fix reply skeleton layout

Adjust the reply loading UI so placeholder lines look like realistic reply content rather than stretching across the full width.

Likely affected areas:

  • src/nostr-post/style.ts
  • src/nostr-post/render.ts

Expected outcome:

  • Skeleton avatar remains compact
  • Skeleton text lines use capped / varied widths
  • Loading rows visually match the reply layout

2) Add reply pagination

Render replies incrementally instead of showing the full thread immediately.

Likely affected areas:

  • src/nostr-post/nostr-post.ts
  • src/nostr-post/render.ts
  • src/nostr-post/style.ts

Expected outcome:

  • Initially render 10 replies
  • Show a Show more control when additional replies exist
  • Each click reveals the next batch without reloading already fetched replies

3) Render rich text inside replies

Use the same or equivalent content pipeline as the main post body so replies can render rich content consistently.

Likely affected areas:

  • src/nostr-post/reply-utils.ts
  • src/nostr-post/nostr-post.ts
  • src/nostr-post/parse-text.ts
  • src/nostr-post/render-content.ts

Expected outcome:

  • Links render as links
  • Embedded notes / nostr references render correctly when supported by the current pipeline
  • Media and other rich content are handled in a reply-safe layout

Acceptance criteria

  • Reply skeleton rows no longer stretch unnaturally across the card
  • Reply lists default to a paginated view of 10 items with a visible Show more action when needed
  • Reply rendering supports rich text features already available to the main post, or clearly documents any intentionally unsupported subset
  • Storybook examples and/or tests cover the updated loading, pagination, and rich-text reply behavior

Requested by

@saiy2k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions