WIP: Vendoo 1.44.0 – UX Foundation & Guided Workspaces #29

Draft
Masterluke77 wants to merge 284 commits from release/1.44.0-ux-foundation-production-update-v1 into main
Showing only changes of commit ebb2849ad7 - Show all commits
+7 -5
View File
@@ -175,9 +175,11 @@
|| left.title.localeCompare(right.title, 'de-DE', { sensitivity: 'base' }));
}
function syncCommandAdapter(action) {
commandDisposers.get(action.id)?.();
commandDisposers.delete(action.id);
function syncCommandAdapter(action, { preserveExisting = false } = {}) {
if (!preserveExisting) {
commandDisposers.get(action.id)?.();
commandDisposers.delete(action.id);
}
if (!action.surfaces.includes('command-palette') || !window.VendooCommands?.register) return;
const dispose = window.VendooCommands.register({
@@ -446,8 +448,8 @@
}
function refresh(actionId = null) {
if (actionId && registry.has(actionId)) syncCommandAdapter(registry.get(actionId));
else if (!actionId) registry.forEach(syncCommandAdapter);
if (actionId && registry.has(actionId)) syncCommandAdapter(registry.get(actionId), { preserveExisting: true });
else if (!actionId) registry.forEach(action => syncCommandAdapter(action, { preserveExisting: true }));
refreshDom();
mountedSurfaces.forEach(entry => {
try { entry.render(); } catch {}