Opening a card writes the user document (profile.cardLastViews, #3078). The
board view (Utils.storedBoardView and allowBoardView, which every list's card
loop reads) and the helpers every minicard runs read the WHOLE user document,
so that one write re-ran every list's card loop, and Blaze then re-evaluated
every minicard: 37,452 Tracker invalidations for one card open on a 40-card
board. Measured in the running app, it is now 390.
client/lib/currentUserWith.js reads the current user with only the named
fields; minimongo re-runs a field-limited query only when a projected field
changes. The board view, feature preview, unread comments, folds, drag
handles, label text, dependency layers, date format, week number, mobile mode
and the admin-only custom field check now use it. setCardLastViewed $sets one
entry instead of rewriting the whole map, which is also capped at 5,000.
Thanks to markusst1982 and xet7 !
Fixes#6745.
Admin Panel / Settings / Visibility has a new Features group. Each
optional group of board views (Table, Calendar, Time, Overview, Gantt,
Scrum, Flow charts, Map) can be turned off for the whole instance. A
disabled feature is removed from the Board View menu and from Board
Settings / Board View rather than greyed out, and a user who had it open
is moved to the board's default view. Its data and every permission stay
as they are.
Administrators can preview disabled features, and named pilot users see
them too. An opt-in policy keeps features added by later WeKan updates
disabled until an administrator enables them; the features present when
it is turned on stay as they were. Swimlanes and Lists are core and
cannot be disabled. The English texts are pending Transifex.
Thanks to nalilord and xet7 !
Fixes#6736.