Add Feature: allow user to sort Lists in Board by his own preference, boardadmin can star list

This commit is contained in:
Sam X. Chen 2019-10-18 16:44:09 -04:00
parent 2737d6b23f
commit bc2a20f04e
15 changed files with 272 additions and 14 deletions

View file

@ -439,6 +439,14 @@ class AdvancedFilter {
const commands = this._filterToCommands();
return this._arrayToSelector(commands);
}
getRegexSelector() {
// generate a regex for filter list
this._dep.depend();
return new RegExp(
`^.*${this._filter.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}.*$`,
'i',
);
}
}
// The global Filter object.
@ -455,8 +463,16 @@ Filter = {
hideEmpty: new SetFilter(),
customFields: new SetFilter('_id'),
advanced: new AdvancedFilter(),
lists: new AdvancedFilter(), // we need the ability to filter list by name as well
_fields: ['labelIds', 'members', 'archive', 'hideEmpty', 'customFields'],
_fields: [
'labelIds',
'members',
'archive',
'hideEmpty',
'customFields',
'lists',
],
// We don't filter cards that have been added after the last filter change. To
// implement this we keep the id of these cards in this `_exceptions` fields