- Timeline -
--
- {snapshot.timeline.map((item, index) => (
-
-
- - - {item.phase.replace(/-/g, ' ')} - - - {item.durationToNext && ( - - ({item.durationToNext}) +++ +++ + ))} + +
+ Timeline +
+-
+ {snapshot.timeline.map((item, index) => (
+
-
+ + + {item.phase.replace(/-/g, ' ')} - )} --
- ))}
-
+++ {proposalComments.length > 0 ? ( ++ Discussion +
+ + View proposal thread + +-
+ {proposalComments.map((comment) => {
+ const systemComment = isSystemComment(comment);
+ const commentKey = `${selectedProposalId ?? 'none'}:${comment.id}`;
+ const isExpanded = expandedCommentIds.has(commentKey);
+ const commentPreview = truncateCommentBody(
+ comment.body,
+ isExpanded
+ );
+ return (
+
-
+ {systemComment ? (
+ + System ++ ) : null} ++ ++
+ {commentPreview} +
+ {isCommentClampEligible(comment.body) ? ( + + ) : null} +
+ );
+ })}
+
+ No discussion recorded for this proposal yet. +
+ )} +@@ -205,14 +340,33 @@ export function ProposalList({ Vote Breakdown {snapshot.votes.total > 0 ? ( --- ๐ {snapshot.votes.thumbsUp} -
-- ๐ {snapshot.votes.thumbsDown} -
-+
++ + ๐ {snapshot.votes.thumbsUp} + + + ๐ {snapshot.votes.thumbsDown} + +++ ++Support:{' '} {snapshot.votes.supportPct !== null ? `${Math.round(snapshot.votes.supportPct * 100)}%` @@ -232,7 +386,7 @@ export function ProposalList({ {snapshot.implementingPR ? ( COMMENT_PREVIEW_MAX_CHARS; +} + +function truncateCommentBody(body: string, expanded: boolean): string { + if (expanded || !isCommentClampEligible(body)) { + return body; + } + + return `${body.slice(0, COMMENT_PREVIEW_MAX_CHARS).trimEnd()}...`; +} + +function isSystemComment(comment: Comment): boolean { + return ( + comment.author === 'hivemoot' || + comment.body.trimStart().startsWith('
-
+