mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
A design that describes what WeKan already DOES belongs with the feature it describes, not in the folder for things being proposed. Fifteen docs move: Design/Accessibility.md -> Features/Accessibility/Accessibility-Improvements.md Design/Original-Positions.md -> Features/Board/Original-Positions.md Design/Page/* -> Features/Page/* (thirteen pages that exist) Design/AdminPanelProblems.md -> Features/Admin-Panel/Problems/Design.md What stays in docs/Design is what the folder is for: the principles (Design-Principles, Monkey-Proof-Software), the comparisons, the roadmap (Multiverse), and the proposals not yet built (Multitenancy, Autoupdate). The Admin Panel Problems design is new and covers six changes - summaries, the per-actor tally, IPv4/IPv6 columns, an API report, a per-address login tally, and blocking with increasing delays. Three are shipped and three are planned; it is filed under the feature because the pane exists, with each planned item marked so it can become plain description as it lands. Every reference in the repository is rewritten - 152 files, including the CSS comments that point at the table-page design, which a first pass over .md and .js alone missed. Two suites asserted the old paths and now assert the new ones. A moved doc whose links nobody fixed is worse than one nobody moved. Thanks to xet7 !
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import { ReactiveVar } from 'meteor/reactive-var';
|
|
import { EscapeActions } from '/client/lib/escapeActions';
|
|
|
|
// Whether the shared page sidebar is open.
|
|
//
|
|
// Module scope, not a template instance: the header that opens it and the
|
|
// sidebar itself are separate Blaze instances - the header is rendered by the
|
|
// layout, the sidebar into the page - so an instance ReactiveVar on either is
|
|
// invisible to the other. Same reason as client/lib/allBoardsSidebar.js.
|
|
//
|
|
// docs/Features/Page/Header.md
|
|
|
|
const openVar = new ReactiveVar(false);
|
|
|
|
export function isPageSidebarOpen() {
|
|
return openVar.get();
|
|
}
|
|
|
|
export function openPageSidebar() {
|
|
openVar.set(true);
|
|
}
|
|
|
|
export function closePageSidebar() {
|
|
openVar.set(false);
|
|
}
|
|
|
|
export function togglePageSidebar() {
|
|
openVar.set(!openVar.get());
|
|
}
|
|
|
|
// Escape closes it, by KEY only: `enabledOnClick` defaults to true, and then
|
|
// every click would close it - including the clicks on its own controls, and
|
|
// the click on the hamburger that had just opened it.
|
|
EscapeActions.register(
|
|
'sidebarView',
|
|
() => closePageSidebar(),
|
|
() => isPageSidebarOpen(),
|
|
{ enabledOnClick: false },
|
|
);
|