Make Table Formulas a built-in feature
The formula engine, the rendered results, and the formula help now come from src/lib/formulas/. The editor and the renderer call this module directly. The tableFormulas contribution type is removed. - Add the tableFormulas general setting (default on) and a switch in Settings > General. When it is off, formulas show as source text. - Do not load an installed runestone.table-formulas package. Settings > Plug-ins marks it as included with RuneStone and tells the user that it can be removed. The user's files stay in place. - Translate the formula help and the error descriptions into French, Japanese, and Simplified Chinese. - Port the plugin unit tests. Test the setting and use a test-only contribution for the generic plugin lifecycle tests. - Smoke tests load only Terminal. The formula and lifecycle tests use the built-in feature and its setting. - Remove scripts/buildPlugins.mjs, the build:plugins script, and the plugin-packages requirement of the smoke runner. - Remove RuneStone_Table_Formulas from the menu audit scope. It had no menu surfaces. - Update the README, the user guides, and the developer references.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import { invoke, isTauri } from "@tauri-apps/api/core";
|
||||
import Icon from "$lib/ui/Icon.svelte";
|
||||
import IconButton from "$lib/ui/IconButton.svelte";
|
||||
import { installedPlugins, externalErrors, pluginServiceError, restartPlugins, refreshPlugins, setPluginEnabled } from "./external";
|
||||
import { builtInPackages, installedPlugins, externalErrors, pluginServiceError, restartPlugins, refreshPlugins, setPluginEnabled } from "./external";
|
||||
import type { Candidate, RemovalPlan, InstalledPlugin } from "./sdk";
|
||||
const desktop = isTauri();
|
||||
const installDateFormat = new Intl.DateTimeFormat(undefined, {
|
||||
@@ -122,7 +122,7 @@
|
||||
<div class="row">
|
||||
<div class="plugin-copy"><label for={`external-${plugin.manifest.id}`}>{plugin.manifest.name}</label><p>{plugin.manifest.description}</p><small>{plugin.manifest.author} · {plugin.manifest.version} · {$t("Full app access")}</small>
|
||||
<div class="status">
|
||||
<span class="badge">{plugin.manifest.id === "runestone.browser" ? $t("Included with RuneStone") : plugin.removal ? $t("Removal incomplete") : plugin.enabled ? $t("Enabled") : $t("Disabled")}</span>
|
||||
<span class="badge">{builtInPackages.includes(plugin.manifest.id) ? $t("Included with RuneStone") : plugin.removal ? $t("Removal incomplete") : plugin.enabled ? $t("Enabled") : $t("Disabled")}</span>
|
||||
<span class="note">
|
||||
{#if plugin.installedAt != null}
|
||||
{$t("Installed")} <time datetime={new Date(plugin.installedAt).toISOString()}>{installDateFormat.format(plugin.installedAt)}</time>
|
||||
@@ -133,7 +133,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input id={`external-${plugin.manifest.id}`} type="checkbox" role="switch" checked={plugin.manifest.id === "runestone.browser" || plugin.enabled} disabled={busy || plugin.removal || plugin.manifest.id === "runestone.browser"} onchange={event => { const value = event.currentTarget.checked; event.currentTarget.checked = plugin.enabled; void toggle(plugin.manifest.id, value, plugin.hash); }} />
|
||||
<input id={`external-${plugin.manifest.id}`} type="checkbox" role="switch" checked={builtInPackages.includes(plugin.manifest.id) || plugin.enabled} disabled={busy || plugin.removal || builtInPackages.includes(plugin.manifest.id)} onchange={event => { const value = event.currentTarget.checked; event.currentTarget.checked = plugin.enabled; void toggle(plugin.manifest.id, value, plugin.hash); }} />
|
||||
<IconButton icon="folder-open" label={$t("Show files")} disabled={busy || plugin.removal} onclick={() => reveal(plugin.manifest.id)} />
|
||||
{#if plugin.removal}
|
||||
<button disabled={busy} onclick={() => run(async () => { await invoke("plugins_retry_remove", { id: plugin.manifest.id }); await refreshPlugins(); message = $t("Plugin file cleanup completed."); })}><Icon icon="refresh" />{$t("Retry cleanup")}</button>
|
||||
@@ -143,6 +143,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{#if plugin.manifest.id === "runestone.browser"}<p class="note">{$t("Browser is now built in. You can remove this old package. Your browser profiles and bookmarks stay available.")}</p>{/if}
|
||||
{#if plugin.manifest.id === "runestone.table-formulas"}<p class="note">{$t("Table Formulas is now built in. You can remove this old package. Your formulas stay in your files. To turn formulas on or off, go to Settings → General.")}</p>{/if}
|
||||
{#if plugin.error || $externalErrors[plugin.manifest.id]}<p class="error" role="alert">{plugin.error || $externalErrors[plugin.manifest.id]}</p>{/if}
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user