Activity

  Dennis Hackethal addressed criticism #3951.

Done as of cc1ab95.

Ruby example:

ruby
def criticized? idea
pending_criticisms(idea).any?
end
def pending_criticisms idea
criticisms(idea).filter { |c| pending_criticisms(c).none? }
end
def criticisms idea
children(idea).filter(&:criticism?)
end

JS example (h/t ChatGPT):

javascript
function criticized(idea) {
return pendingCriticisms(idea).length > 0;
}
function pendingCriticisms(idea) {
return criticisms(idea).filter(c => pendingCriticisms(c).length === 0);
}
function criticisms(idea) {
return children(idea).filter(c => c.isCriticism);
}
#3951·Dennis HackethalOP, 7 days ago

There’s a small issue related to previewing changes in code blocks: even when there are no changes yet, if the code overflows horizontally, the scroll shadow is shown through DOM manipulation, which in turn triggers the diffing library into thinking the user made a change.

So then the same code block is shown without any changes, under the ‘Changes’ tab, which is confusing. It should still just say ‘No changes’.