feat(archive): completed cards move to a mirror of the boards folder
"Archive completed tasks" empties every board of what is finished into a twin of the boards folder - `Boards/work.md` into `Boards/archive/work.md` - itself a Kanban board with the same lanes, so the history opens like any other board and the live one stays short. The same pass lifts a board's native archive (everything below the `***` separator) into that mirror, so finished work is not left sitting in two places. Archived tasks render beside live ones when "Include the archive" and "Show completed" are both on, from the mirrors and from any `***` section still in a board. They carry an Archive badge instead of a project chip, ride with the sphere they came from in the rail, and refuse drops.
This commit is contained in:
1 parent
0cc4655f9f
commit
9c0e57e29b
12 files changed
+680
-122
No files matched your search
+18
-10
@@ -8,7 +8,7 @@ export type SortBy = "manual" | "priority" | "due";
|
||||
|
||||
export interface BeaverCalendarSettings {
|
||||
boardsFolder: string;
|
||||
archiveHeading: string;
|
||||
archiveFolder: string;
|
||||
view: ViewMode;
|
||||
groupBy: GroupBy;
|
||||
listSort: SortBy;
|
||||
@@ -24,7 +24,7 @@ export interface BeaverCalendarSettings {
|
||||
|
||||
export const DEFAULT_SETTINGS: BeaverCalendarSettings = {
|
||||
boardsFolder: "Boards",
|
||||
archiveHeading: "Archive",
|
||||
archiveFolder: "archive",
|
||||
view: "list",
|
||||
groupBy: "sphere",
|
||||
listSort: "due",
|
||||
@@ -70,25 +70,33 @@ export class BeaverCalendarSettingsTab extends PluginSettingTab {
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Archive heading")
|
||||
.setDesc("The lane completed tasks are moved to by the archive command.")
|
||||
.setName("Archive folder")
|
||||
.setDesc(
|
||||
"A subfolder mirroring the boards folder, where the archive command " +
|
||||
"puts completed tasks: a board at Boards/work.md archives into " +
|
||||
"Boards/archive/work.md, itself a Kanban board with the same lanes. " +
|
||||
"The command also lifts a board's old *** archive section in there.",
|
||||
)
|
||||
.addText((text) =>
|
||||
text
|
||||
.setPlaceholder("Archive")
|
||||
.setValue(this.plugin.settings.archiveHeading)
|
||||
.setPlaceholder("archive")
|
||||
.setValue(this.plugin.settings.archiveFolder)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.archiveHeading = value.trim() || "Archive";
|
||||
this.plugin.settings.archiveFolder =
|
||||
normalizeFolder(value) || "archive";
|
||||
await this.plugin.saveSettings();
|
||||
await this.plugin.store.reloadAll();
|
||||
}),
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Include the archive")
|
||||
.setDesc(
|
||||
"Widen the show-completed toggle to reach tasks below the archive " +
|
||||
"Widen the show-completed toggle to reach archived tasks - both the " +
|
||||
"archive folder and whatever still sits below a board's *** " +
|
||||
"separator. With this off, show-completed only reveals completed " +
|
||||
"tasks still sitting in their lanes. Archived tasks carry an " +
|
||||
"Archive badge instead of a project one.",
|
||||
"tasks still in their lanes. Archived tasks carry an Archive badge " +
|
||||
"instead of a project one.",
|
||||
)
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
|
||||
Reference in new issue
Block a user