List block: bold text and a plain detail by default, with a Style to keep the old look

Migration 092 adds content_blocks.list_style: blank is bold text and
a detail in the body color, 'plain' the plain text and gray detail
lists had before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-11 03:20:00 -06:00
parent 6a0271efd9
commit e9ea75a68d
7 changed files with 44 additions and 11 deletions

View file

@ -389,7 +389,10 @@ function Block({
</h4>
)
case 'list':
case 'list': {
// Bold text and a plain detail, unless the block is set Plain
// (092): plain text, gray detail.
const plain = block.list_style === 'plain'
return (
<ul className="space-y-2">
{(block.items ?? []).map((item, index) => (
@ -397,20 +400,23 @@ function Block({
<span aria-hidden="true" style={{ color: accentText(accent) }}>
•
</span>
<span style={{ color: BODY }}>
{item.url ? (
<Anchor href={item.url} className="underline" style={{ color: accentText(accent) }}>
{item.text}
</Anchor>
) : (
<Inline text={item.text} accent={accent} />
)}
{item.detail && <span className="opacity-70">: {item.detail}</span>}
<span style={{ color: plain ? BODY : 'var(--color-body)' }}>
<span className={plain ? undefined : 'font-bold'}>
{item.url ? (
<Anchor href={item.url} className="underline" style={{ color: accentText(accent) }}>
{item.text}
</Anchor>
) : (
<Inline text={item.text} accent={accent} />
)}
</span>
{item.detail && <span className={plain ? 'opacity-70' : undefined}>: {item.detail}</span>}
</span>
</li>
))}
</ul>
)
}
case 'links':
return (

View file

@ -529,6 +529,14 @@ export const blocksChild = {
when: { path: "type", value: TEXT_TYPES },
help: (row) => TEXT_HELP[row?.type],
},
{
path: "list_style",
label: "Style",
widget: "select",
options: [["plain", "Plain text, gray detail"]],
blankLabel: "Default: bold text, normal detail",
when: { path: "type", value: "list" },
},
{
path: "cite",
label: "Attribution",

View file

@ -54,6 +54,8 @@ export type ContentBlock = {
team_id?: string | null
/** Who a quote is by. */
cite?: string | null
/** A list block's style (092): null bold text, 'plain' the old look. */
list_style?: 'plain' | null
/** A video block's WebVTT file, for an uploaded video (066). */
captions?: string | null
items?: ContentBlockItem[]