mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The star group in the first header bar is a bookmarks menu now: caret, count, star. It held boards only - a board could be starred and reached from the dropdown, and every other page could not, so the one control for "keep this where I can get at it" worked on one kind of destination and was absent on the rest, even though those pages have had their own addresses since the All Boards and Admin Panel URLs landed. The star on any other page stars THAT PAGE. A bookmark is a relative URL and the title from the browser tab: relative so it survives the site moving to another host, and an absolute or protocol-relative URL is refused rather than cleaned up, because the stored value goes into an href the reader clicks. The browser tab now says where you are - "Product name - All Boards / Remaining" - instead of only the product name, so ten open tabs of one WeKan are no longer ten identical tabs and a bookmark of any of them is named after the page. The path is the one the header already computes for the title's tooltip, published through a leaf module rather than worked out twice. In All Boards / Starred the bookmarks are tiles beside the starred boards, with the white border the template-container tile carries, the theme's own colour behind them, and both the title and the URL - the title says where it goes, the address says what it is. Each tile has its own unstar button, because the star in the header stars the page you are on. Dragging a tile past another reorders them, and that is the order of the header dropdown: the two are views of one array. The move matches both ends by URL rather than by index, since the two views are rendered separately and an index from one is a guess about the other. The list is capped at 50, oldest dropped, because it is a dropdown. Documented in docs/Features/Board/Starred.md. Thanks to xet7 !
16 lines
765 B
JavaScript
16 lines
765 B
JavaScript
import { ReactiveVar } from 'meteor/reactive-var';
|
|
|
|
// The page's path as the header bar computes it: "All Boards / Remaining",
|
|
// "Admin Panel / Settings / Version".
|
|
//
|
|
// The header is the one thing rendered on every page and the one place that
|
|
// already works this out - it draws the path as the title's tooltip - and the
|
|
// browser tab needs the same words. Rather than compute it twice, or have
|
|
// `Utils` import a page component (which once ran a module before its own
|
|
// template was registered and threw), the header PUBLISHES it here and anyone
|
|
// who needs it reads it.
|
|
//
|
|
// A leaf: this module imports nothing but ReactiveVar, so it cannot be half of
|
|
// an import cycle. docs/Features/Board/Starred.md
|
|
export const headerPathVar = new ReactiveVar('');
|