From 77bc5f994434b8eb0a7d9986ff0cb943a90d5d83 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 29 Jan 2021 23:33:41 +0100 Subject: [PATCH] disabling tree expand animation to avoid "recursion" errors --- package-lock.json | 24 ++++++++++++------------ package.json | 4 ++-- src/public/app/services/app_context.js | 2 +- src/public/app/services/glob.js | 2 +- src/public/app/widgets/note_tree.js | 8 ++++---- src/public/stylesheets/style.css | 1 - 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 736dc82a9..0f3e97174 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1769,9 +1769,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001180", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001180.tgz", - "integrity": "sha512-n8JVqXuZMVSPKiPiypjFtDTXc4jWIdjxull0f92WLo7e1MSi3uJ3NvveakSh/aCl1QKFAvIz3vIj0v+0K+FrXw==", + "version": "1.0.30001181", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001181.tgz", + "integrity": "sha512-m5ul/ARCX50JB8BSNM+oiPmQrR5UmngaQ3QThTTp5HcIIQGP/nPBs82BYLE+tigzm3VW+F4BJIhUyaVtEweelQ==", "dev": true }, "caseless": { @@ -2634,9 +2634,9 @@ } }, "electron": { - "version": "9.4.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-9.4.2.tgz", - "integrity": "sha512-WpnJLDFHtj5eIewAi4hMHxGdbwkzjzmxsMu/BtDFCic3wpruchkskL7EV28Sg/IYTAqo6yN5ISfnFaQcLsIdng==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-11.2.1.tgz", + "integrity": "sha512-Im1y29Bnil+Nzs+FCTq01J1OtLbs+2ZGLLllaqX/9n5GgpdtDmZhS/++JHBsYZ+4+0n7asO+JKQgJD+CqPClzg==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -3208,9 +3208,9 @@ } }, "electron-to-chromium": { - "version": "1.3.646", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.646.tgz", - "integrity": "sha512-P+3q8ugIPezulqoBYaLoUsF0fT4YNpe+zEDmdDUDnHZUAeSbBjMbis+JjJp9duU8BdfWV3VXf27NTBcwhRTsAQ==", + "version": "1.3.649", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.649.tgz", + "integrity": "sha512-ojGDupQ3UMkvPWcTICe4JYe17+o9OLiFMPoduoR72Zp2ILt1mRVeqnxBEd6s/ptekrnsFU+0A4lStfBe/wyG/A==", "dev": true }, "electron-window-state": { @@ -7685,9 +7685,9 @@ "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" }, "webpack": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.18.0.tgz", - "integrity": "sha512-RmiP/iy6ROvVe/S+u0TrvL/oOmvP+2+Bs8MWjvBwwY/j82Q51XJyDJ75m0QAGntL1Wx6B//Xc0+4VPP/hlNHmw==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.19.0.tgz", + "integrity": "sha512-egX19vAQ8fZ4cVYtA9Y941eqJtcZAK68mQq87MMv+GTXKZOc3TpKBBxdGX+HXUYlquPxiluNsJ1VHvwwklW7CQ==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", diff --git a/package.json b/package.json index cdd939437..42e2fbbc0 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "cross-env": "7.0.3", - "electron": "9.4.2", + "electron": "11.2.1", "electron-builder": "22.9.1", "electron-packager": "15.2.0", "electron-rebuild": "2.3.4", @@ -87,7 +87,7 @@ "jsdoc": "3.6.6", "lorem-ipsum": "2.0.3", "rcedit": "3.0.0", - "webpack": "5.18.0", + "webpack": "5.19.0", "webpack-cli": "4.4.0" }, "optionalDependencies": { diff --git a/src/public/app/services/app_context.js b/src/public/app/services/app_context.js index f2190c537..886e76c00 100644 --- a/src/public/app/services/app_context.js +++ b/src/public/app/services/app_context.js @@ -85,7 +85,7 @@ class AppContext extends Component { } /** @return {Promise} */ - triggerCommand(name, data = {}) { + triggerCommand(name, data = {}) {console.log("CMD", name); for (const executor of this.executors) { const fun = executor[name + "Command"]; diff --git a/src/public/app/services/glob.js b/src/public/app/services/glob.js index 352032194..50bfbd75f 100644 --- a/src/public/app/services/glob.js +++ b/src/public/app/services/glob.js @@ -58,7 +58,7 @@ function setupGlobs() { 'Line: ' + lineNo, 'Column: ' + columnNo, 'Error object: ' + JSON.stringify(error), - 'Stack: ' + error && error.stack + 'Stack: ' + (error && error.stack) ].join(', '); } diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index d05f203d0..eb67c3580 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -630,7 +630,7 @@ export default class NoteTreeWidget extends TabAwareWidget { node.title = utils.escapeHtml(title); if (node.isExpanded() !== branch.isExpanded) { - node.setExpanded(branch.isExpanded, {noEvents: true}); + node.setExpanded(branch.isExpanded, {noEvents: true, noAnimation: true}); } node.renderTitle(); @@ -769,7 +769,7 @@ export default class NoteTreeWidget extends TabAwareWidget { await node.load(true); if (node.data.noteId !== 'root') { // root is always expanded - await node.setExpanded(isExpanded, {noEvents: true}); + await node.setExpanded(isExpanded, {noEvents: true, noAnimation: true}); } }); } @@ -852,7 +852,7 @@ export default class NoteTreeWidget extends TabAwareWidget { } if (expand) { - await parentNode.setExpanded(true); + await parentNode.setExpanded(true, {noAnimation: true}); // although previous line should set the expanded status, it seems to happen asynchronously // so we need to make sure it is set properly before calling updateNode which uses this flag @@ -956,7 +956,7 @@ export default class NoteTreeWidget extends TabAwareWidget { const activeNode = $.ui.fancytree.getNode(e); activeNode.load(true); - activeNode.setExpanded(true); + activeNode.setExpanded(true, {noAnimation: true}); toastService.showMessage("Saved search note refreshed."); } diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 3d7370e97..5f7e0bac8 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -686,7 +686,6 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href .component { contain: size; - content-visibility: auto; } .toast {