Use secondary scale for PR comment bodies

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
brennanb2025
2026-06-24 14:10:17 -07:00
co-authored by Orca
parent dc295f315e
commit 64070f7f3e
2 changed files with 8 additions and 5 deletions
@@ -15,7 +15,8 @@ describe('pr-comment-presentation', () => {
it('returns card layout tokens for cards and focus variants', () => {
const cards = getPRCommentPresentationClasses('cards')
expect(cards.useCardLayout).toBe(true)
expect(cards.commentBody).toContain('text-[13px]')
expect(cards.commentBody).toContain('text-xs')
expect(cards.commentBody).toContain('leading-5')
expect(cards.commentBody).toContain('text-foreground')
expect(cards.group).toContain('bg-secondary')
expect(cards.group).toContain('shadow-xs')
@@ -24,8 +25,10 @@ describe('pr-comment-presentation', () => {
const focus = getPRCommentPresentationClasses('focus')
expect(focus.useCardLayout).toBe(true)
expect(focus.commentBody).toContain('text-[13px]')
expect(focus.commentBodyReply).toContain('text-[13px]')
expect(focus.commentBody).toContain('text-xs')
expect(focus.commentBody).toContain('leading-5')
expect(focus.commentBodyReply).toContain('text-xs')
expect(focus.commentBodyReply).toContain('leading-5')
expect(focus.author).toContain('text-[13px]')
expect(focus.list).toContain('gap-2')
expect(focus.commentBody).toContain('px-4 py-2.5')
@@ -96,8 +96,8 @@ const COMMENT_AVATAR =
const RESOLVED_SECTION_LABEL =
'text-[11px] font-semibold uppercase tracking-wider text-muted-foreground'
// Why: cards and focus share dense sidebar scale so PR comments do not read oversized.
const CARD_COMMENT_BODY_SIZE = 'text-[13px] leading-relaxed'
// Why: markdown bodies need the secondary sidebar scale; 13px relaxed copy reads oversized in narrow comment cards.
const CARD_COMMENT_BODY_SIZE = 'text-xs leading-5'
const CARD_COMMENT_AUTHOR_SIZE = 'text-[13px]'
const CARD_COMMENT_LIST_GAP = 'gap-2'
const CARD_COMMENT_BODY_PADDING = 'px-4 py-2.5'