mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Design: docs/Design/Page/All-Boards.md, whose Table view is the shared table page (docs/Design/Page/Table.md) and which describes only what is different here. ONE ROW OF CONTROLS. The page carried its own row above the board icons - Multi-Selection with its archive and duplicate actions, Sort, the search box - in .boards-path-header, while the second top header bar above it held only the title. Two rows of controls on one page, one of them styled like the board header of the Swimlanes view and one not. Starred, Sort, Search, Multi-Selection and the view menu are in the header bar now, as .board-header-btn with the same Font Awesome glyphs and the same emphasis state, so this page agrees with every other page about where a WeKan page puts its controls. The actions ON a selection stayed with the boards: Archive, Duplicate and the "Selected:" star/home actions appear only while something is selected and are about those rows, not about the page. SEARCH IS A FIELD, not a button that opens a search view. It filters as you type, searches across all your boards ignoring the selected section while it has text, and Escape clears it - the old right-pane behaviour exactly. That is a deliberate difference from the board header, whose Search opens a search view over cards; here it filters the list it sits above. THE VIEW MENU names the CURRENT view - "Lists" or "Table" - not the words "Board View", the same as the board header, which says "Swimlanes" or "Lists" rather than naming the menu. Lists is the default and is what an account that has never chosen sees. The choice is kept in localStorage rather than on the user document: it is a view preference for one page and changes nothing anybody else can see. A board's view IS on the profile, because it follows the user between devices; this deliberately does not. THE TABLE VIEW is the shared table page, editable - which is what separates it from the other board table, /public, which is read-only. Columns: Edit, Board title, Board description. Ten rows a page. Edit opens the SAME popup the Swimlanes view opens from its board menu, not a copy of it. That took one change: boardChangeTitlePopup's submit read Utils.getCurrentBoard(), which is the board you are looking at - and on All Boards you are not looking at one. It takes the board from its own data context when it has one and falls back to the current board, so the board header is unchanged. TWO THINGS THE REFACTOR NEEDED. The state had to be shared. boardListHeaderBar and boardList are separate Blaze instances - the bar is rendered into the layout's headerBar region, the page into its content region - so the search field would have filtered nothing. The search term and the selected section are module-level ReactiveVars now, assigned onto the page instance so every `tpl.boardSearchVar.get()` already written keeps working. And "which boards am I looking at" had to stay one answer: the `boards` helper's body is `boardsForView(tpl)` now, called by both views, because two copies of a membership + section + search + sort + paging query would drift. The view module is split in two for the same reason the others are: which views exist and which is the default is pure (models/lib/allBoardsView.js) and unit tested; the ReactiveVars and localStorage are Meteor glue and cannot be loaded in a plain Node test. The guard in tests/addBoardTileHeight.test.cjs pinned the ORDER of the three controls inside .path-right. That row is gone on purpose, so the guard now pins the order where the controls are - and that the page body does not also carry them, which is the thing that was wrong. Thanks to xet7 !