Make Project Management a native feature
- Move the storage and model of the plugin into src/lib/features/pm/ as pure TypeScript, so the skill can still bundle them. - Move the DOM interface onto the host menus, the shared tooltip, and the host icons. - A ribbon button opens Project Management. Board tabs keep the owner runestone.pm and the board-<hex> view IDs through view patterns. - Read only .runestone/pm/. Offer the plugin migration, with backups, for legacy notes. - A save, move, or delete reads only that card again. Watcher paths reach the feature. - Add Settings → Project Management and the projectManagement section. View states move to localStorage. - Background reads the boards from workspace.json. Remove api.backgrounds and the boards service. - Add yaml 2.9.1. Use the host markdown-it. - Move 18 plugin test files to tests/unit/features/pm/ and add native tests.
This commit is contained in:
@@ -71,8 +71,11 @@ export const TABLE = {
|
||||
pm: {
|
||||
plugin: { id: "runestone.pm", repo: "runestone-pm", tag: "v0.2.49", zip: `${PLUGIN_RELEASES}/RuneStone_Project_Management/releases/runestone.pm-0.2.49.zip` },
|
||||
nativeKey: "pm",
|
||||
/** Where the view opens: `palette`, or `menu:<ribbon menu name>`. */
|
||||
openIn: { plugin: "menu:Plug-in views", native: "menu:Plug-in views" },
|
||||
/**
|
||||
* Where the view opens: `palette`, `menu:<ribbon menu name>`, or `ribbon:<ribbon button name>`. Native: the static
|
||||
* ribbon button opens the default board or All tasks, and the first click loads the feature (src/lib/features/pm/).
|
||||
*/
|
||||
openIn: { plugin: "menu:Plug-in views", native: "ribbon:Project Management" },
|
||||
title: "Project Management",
|
||||
card: { plugin: ".pm-card", native: ".pm-card" },
|
||||
minCards: 50,
|
||||
@@ -101,9 +104,14 @@ export async function runPaletteCommand(page, title) {
|
||||
await input.press("Enter");
|
||||
}
|
||||
|
||||
/** Run a command from the palette or from a ribbon menu. `where` is `palette` or `menu:<menu name>`. */
|
||||
/**
|
||||
* Run a command from the palette, from a ribbon menu, or from a ribbon button.
|
||||
* `where` is `palette`, `menu:<menu name>`, or `ribbon:<button name>`.
|
||||
*/
|
||||
export async function runCommand(page, where, title) {
|
||||
if (where === "palette") return runPaletteCommand(page, title);
|
||||
const button = /^ribbon:(.+)$/.exec(where)?.[1];
|
||||
if (button) return page.locator(".plugin-ribbon").getByRole("button", { name: button, exact: true }).click();
|
||||
const menu = /^menu:(.+)$/.exec(where)?.[1];
|
||||
if (!menu) throw new Error(`Unknown command place ${where}.`);
|
||||
await page.locator(".plugin-ribbon").getByRole("button", { name: menu, exact: true }).click();
|
||||
|
||||
Reference in New Issue
Block a user