Files
wekan/docs/Design/Page/Archive.md
T
Lauri Ojansivu 09003f0172 Boards in Archive is a page, not a modal.
It was Modal.open('archivedBoards'), from three different menus, so the one
place that lists every archived board - with its own search and its own pager -
was a box floating over whatever you happened to be looking at. It had no
address, so it could not be linked to a colleague, bookmarked or opened in a
second tab; there was nothing to come back to; and Escape closed it while you
were reading it. "Restore the board I archived last month" is a task, not a
glance.

/archive is a page now, in the default layout, with the same second top header
bar as every other page and the board session state cleared the way the other
non-board pages clear it. The template is the same one the modal used, minus its
own h2: a modal has no header bar to be named in, so it drew its own title, and
on a page that is the title printed twice. archivedBoardsHeaderBar names it
once, where every other page is named. The search, the per-board Restore and
Delete, and the SERVER-side paging all survive the move - the subscription still
publishes one page at a time, so a long archive stays fast.

All four entry points go to it by route NAME rather than by a path spelled out
in four places: the board menu, the member menu, the board sidebar, and the All
Boards sidebar.

That fourth one did not work at all. The row was drawn in the All Boards
sidebar's home view, and clicking it did nothing: the handler it relied on lived
in the header bar's events map and went when that map was rewritten for the
sidebar. A Blaze event map only sees events inside its own template, and the
button had moved out of it. It has its own handler now, and the sidebar closes
behind it - the page it opens replaces the page the panel belongs to.

Written down in docs/Design/Page/Archive.md.

Thanks to xet7 !
2026-07-31 12:34:53 +03:00

2.9 KiB

Design: Boards in Archive

/archive is a page, with the same second top header bar as every other page.

It was a modal — Modal.open('archivedBoards'), from three different menus — so the one place that lists every archived board, with its own search and its own pager, was a box floating over whatever you happened to be looking at. It had no address, so it could not be linked to a colleague or bookmarked or opened in a second tab; there was nothing to come back to; and Escape closed it while you were reading. "Restore the board I archived last month" is a task, not a glance.

Where it is reached from

From Control
The board menu js-open-archived-board in boardHeader.js
The member menu the same class, in userHeader.js
The board sidebar the same class, in sidebar.js
The All Boards sidebar the same class, in its home view

All four FlowRouter.go('archive') — by route name, so the path is spelled out once, in the router, rather than in four places that can drift apart.

The All Boards one had no handler at all. It was drawn, and clicking it did nothing: the handler it relied on lived in the header bar's events map, and went when that map was rewritten for the sidebar. A Blaze event map only sees events inside its own template, and the button had moved out of it.

What the page is

archivedBoards, in client/components/boards/boardArchive.jade — the same template the modal used, minus its own h2. A modal has no header bar to be named in, so it drew its own title; on a page that is the title printed twice. archivedBoardsHeaderBar names it once, where every other page is named.

It keeps what made it worth having:

  • Search, over every archived board, not just the page you can see.
  • Server-side paging — the subscription publishes one page at a time (archivedBoards, with a search term, a limit and a skip), so an instance with a long archive stays fast. The page size is the app's one TABLE_PAGE_ROWS_PER_PAGE.
  • Restore and Delete per board, delete behind a confirm.

Restoring navigates to the restored board; deleting the last one you were on goes home.

File Path File Type Description
config/router.js .js routes The /archive route.
client/components/boards/boardArchive.jade .jade template archivedBoardsHeaderBar and archivedBoards.
client/components/boards/boardArchive.js .js Blaze template logic The search, the pager, restore and delete.
tests/archivePage.test.cjs .cjs Node test That it is a page, that nothing opens it as a modal, that all four entry points reach it, and that the search and paging survived the move.