@molecule/app-forum-thread-row-solid

Feature · forum-thread-row · App (browser) · v1.1.3 · Apache-2.0

Discussion / forum thread row with vote score, reply count, pin/lock badges, tags

npm install @molecule/app-forum-thread-row-solid

npm · Source on GitHub

How it works

@molecule/app-forum-thread-row-solid is a ready-made forum-thread-row feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { ForumThreadRow } from '@molecule/app-forum-thread-row-solid'

declare function openThread(): void
;<ForumThreadRow
  title="How do I reset my password?"
  excerpt="I tried the forgot-password link but never received an email."
  voteScore={42}
  replyCount={7}
  viewCount={320}
  author="alice"
  createdAt="2 hours ago"
  onClick={openThread}
/>

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid forum / discussion-board thread row.

Exports ForumThreadRow — title, optional excerpt, vote score, reply/view counts, pin/lock badges, author, timestamp, and an optional voteControls slot for inline up/down buttons. It is the Solid counterpart of @molecule/app-forum-thread-row-react: the same props (React names) and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { ForumThreadRow } from '@molecule/app-forum-thread-row-solid'

declare function openThread(): void
;<ForumThreadRow
  title="How do I reset my password?"
  excerpt="I tried the forgot-password link but never received an email."
  voteScore={42}
  replyCount={7}
  viewCount={320}
  author="alice"
  createdAt="2 hours ago"
  onClick={openThread}
/>

Type

feature

Installation

npm install @molecule/app-forum-thread-row-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

ForumThreadRowProps

Props for ForumThreadRow.

interface ForumThreadRowProps {
  /** Thread title. */
  title: JSX.Element
  /** Optional snippet of the OP body. */
  excerpt?: JSX.Element
  /** Aggregate vote score / upvotes. */
  voteScore?: number
  /** Reply count. */
  replyCount?: number
  /** View count. */
  viewCount?: number
  /** Optional pinned indicator. */
  pinned?: boolean
  /** Optional locked indicator. */
  locked?: boolean
  /** Author display. */
  author?: JSX.Element
  /** Created-at display (relative or absolute). */
  createdAt?: JSX.Element
  /** Tag chips. */
  tags?: JSX.Element
  /** Right-side voting controls slot. */
  voteControls?: JSX.Element
  /**
   * Activates the row: the whole row is clickable through a transparent native
   * button laid over it (Enter and Space activate it natively), named by the
   * title — the `<h3>` itself takes the generated id. The `voteControls` and
   * `tags` slots sit above that button and keep their own clicks.
   */
  onClick?: () => void
  /** Extra classes. */
  className?: string
}

Functions

ForumThreadRow(props)

Forum / discussion-board thread row. Shows the title, optional excerpt, vote score + reply/view counts, pin/lock badges, author, and timestamp. Pass voteControls to render up/down buttons inline.

The marker labels ("Pinned" / "Locked", announced through role="img" + aria-label) and the counter labels ("votes", "{{count}} replies", "{{count}} views") go through t() with those English defaults — the same text, through the same keys, React renders. The row has no root data-mol-id prop, exactly like React.

function ForumThreadRow(props: ForumThreadRowProps): JSX.Element
  • props — Component props (see ForumThreadRowProps).

Returns: The rendered thread row.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • Styling routes through getClassMap() — a ClassMap bond (e.g. @molecule/app-ui-tailwind) must be wired or rendering throws.

  • KNOWN GAP (same as React): the counter labels ("votes", "replies", "views") and the pin/lock aria-labels are hardcoded English (there is no companion locale bond yet). For localized apps, pass pre-formatted content via tags / voteControls or wrap the row until the package routes text through t().

  • The row has no data-mol-id support yet; add your own wrapper attribute if AI-agent/e2e selectors need to target it.

Translations

Translation strings are provided by @molecule/app-locales-forum-thread-row.