Open whusnoopy opened 2 years ago
Hello - yes please, if you can figure it out that would be very helpful :)
Ok I started having a look at this ... there is a closed
boolean on each card. Only the closed:false
cards are displayed on the page as filtered when the board lists and cards are loaded:
// Load the root elements into the board
self.lists(data.lists.filter(list => !list.closed).map(data => new List(data)))
self.cards(data.cards.filter(card => !card.closed).map(data => new Card(data)))
A quick test by negating the card.closed
check does indeed show the archived cards. I feel like there could be problems with this as an archived card could be on an archived list also. Trello shows archived items in the sidebar, and lets you pop them up. I feel like we should do something similar.
Another solution could be to simply add an observable toggle as board.lists()
and board.cards()
are already observable arrays. They could just be changed to be pureComputed
s listening to a showArchived
observable. Open and closed lists should be shown, and perhaps lists with no cards should be hidden while displaying archived cards.
If the exported json with archived cards, we can't view them via the current version, though these cards data stored in the json file.
I wish I can give a pull request later to do it.