Fixed Rare bug: All Boards page icons random dance. Commented out All Boards show members, cards counts, and some migrations.

Fixes #4214

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2023-06-09 16:27:04 +03:00
parent 695cdfcc4e
commit b75e16f104
5 changed files with 52 additions and 11 deletions

View file

@ -7,10 +7,22 @@ Template.boardList.helpers({
return Settings.findOne();
},
hideCardCounterList() {
return Utils.isMiniScreen() && Session.get('currentBoard');
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
// by commenting out following line,
// where it probably counts too often at realtime,
// and makes cards that have card count and member list change size
// and order all the time:
//return Utils.isMiniScreen() && Session.get('currentBoard');
return true;
},
hideBoardMemberList() {
return Utils.isMiniScreen() && Session.get('currentBoard');
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
// by commenting out following line,
// where it probably counts too often at realtime,
// and makes cards that have card count and member list change size
// and order all the time:
//return Utils.isMiniScreen() && Session.get('currentBoard');
return true;
},
})
@ -52,7 +64,6 @@ BlazeComponent.extendComponent({
onRendered() {
const itemsSelector = '.js-board:not(.placeholder)';
const $boards = this.$('.js-boards');
$boards.sortable({
connectWith: '.js-boards',
@ -84,8 +95,9 @@ BlazeComponent.extendComponent({
// DOM in its initial state. The card move is then handled reactively by
// Blaze with the below query.
$boards.sortable('cancel');
board.move(sortIndex.base);
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
// by commenting out following line:
//board.move(sortIndex.base);
},
});
@ -209,23 +221,29 @@ BlazeComponent.extendComponent({
});
},
boardLists(boardId) {
/*
let boardLists = [];
const lists = Lists.find({ 'boardId': boardId, 'archived': false },{sort: ['sort','asc']});
lists.forEach(list => {
let cardCount = Cards.find({ 'boardId': boardId, 'listId': list._id }).count()
boardLists.push(`${list.title}: ${cardCount}`);
});
return boardLists
return boardLists;
*/
return false;
},
boardMembers(boardId) {
/*
let boardMembers = [];
const lists = Boards.findOne({ '_id': boardId })
let members = lists.members
members.forEach(member => {
boardMembers.push(member.userId);
});
return boardMembers
return boardMembers;
*/
return false;
},
isStarred() {