jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

The working notes tab should exclude published working notes #620

Open jkomoros opened 2 years ago

jkomoros commented 2 years ago

In production we'll start having a "Riffs" section which are published working-notes (and has a tab that has a start_card of 'about-riffs')

So we don't want duplicate cards showing up in Working Notes and the Riffs sections for non editors, so we want to add unpublished to the default working notes tab.

But the published/unpublished filter is also an auto TODO which means that it bails early for cards that aren't content cards.

jkomoros commented 2 years ago

Can CARD_FILTER_FUNCS just use the naked filter func and not use makeBasicCardFilterFunc? ... But also when does does-not-need-to-be-published (or any of the needs-todo does-not-need-todo) filters get set? Ah, those are set in DOES_NOT_NEED_func

So really those filters aren't "this thing has a TODO that must be done" but "this card has a factual thing true about it" and the latter "does-not-need-foo" is what tells you if it actually needs it. But the logic for deciding if it should be automatically applied as a TODO when you're saving (or rather, automatically show up as being a TODO when editing) is where it should skip out... but that's different than the filter applying or not

jkomoros commented 2 years ago
jkomoros commented 2 years ago

29a693e wasn't right behavior, because now working-notes that aren't published also match published even though they shouldn't. (What happened before?)

jkomoros commented 2 years ago

The config on Mac Pro needs to be switched to start_cards = ['about-riffs'] and fix the published/unppublsiihed thing in the comment above.

(Should we make it so hideIfEmpty can be true even if count is not?)