Let the human comment on each decision in the ready-for-merge card
This commit is contained in:
@@ -412,6 +412,7 @@ struct MDContext {
|
||||
var color: Color = Palette.text
|
||||
var taskId: String?
|
||||
var choice: ((MDItem, Bool) -> AnyView)?
|
||||
var discuss: ((MDItem) -> AnyView)?
|
||||
var gridColumns = 4
|
||||
var weight: CGFloat = 400
|
||||
var dir = ""
|
||||
@@ -470,6 +471,9 @@ struct MarkdownView: View {
|
||||
if ctx.choice != nil && items.contains(where: { $0.choice != nil }) {
|
||||
return false
|
||||
}
|
||||
if ctx.discuss != nil && items.contains(where: { $0.discuss }) {
|
||||
return false
|
||||
}
|
||||
return items.allSatisfy { !hasImage($0.inline) && $0.blocks.allSatisfy(flows) }
|
||||
default:
|
||||
return false
|
||||
@@ -846,7 +850,11 @@ private struct ListBlock: View {
|
||||
Text(verbatim: ordered ? "\(start + n)." : "•")
|
||||
.font(Fonts.font(ctx.size))
|
||||
.foregroundStyle(ctx.color)
|
||||
ItemBody(item: item, ctx: ctx)
|
||||
if item.discuss, let discuss = ctx.discuss {
|
||||
discuss(item)
|
||||
} else {
|
||||
ItemBody(item: item, ctx: ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user