From 16afd316388994f86edf9fc8571d830f894c6fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 5 Aug 2023 09:37:08 +0200 Subject: [PATCH] fix: Use resize observer to calculate menubar icon limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- package-lock.json | 97 +++++++++++++++++++++++++++------ package.json | 2 + src/components/Menu/MenuBar.vue | 77 ++++++-------------------- 3 files changed, 100 insertions(+), 76 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82bf76dd364..78f220d92fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,6 +60,7 @@ "@tiptap/pm": "^2.0.4", "@tiptap/suggestion": "^2.0.4", "@tiptap/vue-2": "^2.0.4", + "@vueuse/shared": "^10.3.0", "debounce": "^1.2.1", "escape-html": "^1.0.3", "highlight.js": "^11.8.0", @@ -94,6 +95,7 @@ "@vitejs/plugin-vue2": "^2.2.0", "@vue/test-utils": "^1.3.0 <2", "@vue/vue2-jest": "^29.2.4", + "@vueuse/core": "^10.3.0", "cypress": "^12.17.2", "eslint-plugin-cypress": "^2.13.3", "identity-obj-proxy": "^3.0.0", @@ -5733,7 +5735,7 @@ "vue-demi": ">=0.14.0" } }, - "node_modules/@vueuse/core": { + "node_modules/@vueuse/components/node_modules/@vueuse/core": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.1.2.tgz", "integrity": "sha512-roNn8WuerI56A5uiTyF/TEYX0Y+VKlhZAF94unUfdhbDUI+NfwQMn4FUnUscIRUhv3344qvAghopU4bzLPNFlA==", @@ -5747,7 +5749,7 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/@vueuse/metadata": { + "node_modules/@vueuse/components/node_modules/@vueuse/metadata": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.1.2.tgz", "integrity": "sha512-3mc5BqN9aU2SqBeBuWE7ne4OtXHoHKggNgxZR2K+zIW4YLsy6xoZ4/9vErQs6tvoKDX6QAqm3lvsrv0mczAwIQ==", @@ -5755,7 +5757,7 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/@vueuse/shared": { + "node_modules/@vueuse/components/node_modules/@vueuse/shared": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.1.2.tgz", "integrity": "sha512-1uoUTPBlgyscK9v6ScGeVYDDzlPSFXBlxuK7SfrDGyUTBiznb3mNceqhwvZHjtDRELZEN79V5uWPTF1VDV8svA==", @@ -5766,6 +5768,41 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/@vueuse/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.3.0.tgz", + "integrity": "sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.17", + "@vueuse/metadata": "10.3.0", + "@vueuse/shared": "10.3.0", + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.3.0.tgz", + "integrity": "sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.3.0.tgz", + "integrity": "sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==", + "dependencies": { + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -26593,30 +26630,58 @@ "@vueuse/core": "10.1.2", "@vueuse/shared": "10.1.2", "vue-demi": ">=0.14.0" + }, + "dependencies": { + "@vueuse/core": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.1.2.tgz", + "integrity": "sha512-roNn8WuerI56A5uiTyF/TEYX0Y+VKlhZAF94unUfdhbDUI+NfwQMn4FUnUscIRUhv3344qvAghopU4bzLPNFlA==", + "requires": { + "@types/web-bluetooth": "^0.0.17", + "@vueuse/metadata": "10.1.2", + "@vueuse/shared": "10.1.2", + "vue-demi": ">=0.14.0" + } + }, + "@vueuse/metadata": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.1.2.tgz", + "integrity": "sha512-3mc5BqN9aU2SqBeBuWE7ne4OtXHoHKggNgxZR2K+zIW4YLsy6xoZ4/9vErQs6tvoKDX6QAqm3lvsrv0mczAwIQ==" + }, + "@vueuse/shared": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.1.2.tgz", + "integrity": "sha512-1uoUTPBlgyscK9v6ScGeVYDDzlPSFXBlxuK7SfrDGyUTBiznb3mNceqhwvZHjtDRELZEN79V5uWPTF1VDV8svA==", + "requires": { + "vue-demi": ">=0.14.0" + } + } } }, "@vueuse/core": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.1.2.tgz", - "integrity": "sha512-roNn8WuerI56A5uiTyF/TEYX0Y+VKlhZAF94unUfdhbDUI+NfwQMn4FUnUscIRUhv3344qvAghopU4bzLPNFlA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.3.0.tgz", + "integrity": "sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==", + "dev": true, "requires": { "@types/web-bluetooth": "^0.0.17", - "@vueuse/metadata": "10.1.2", - "@vueuse/shared": "10.1.2", - "vue-demi": ">=0.14.0" + "@vueuse/metadata": "10.3.0", + "@vueuse/shared": "10.3.0", + "vue-demi": ">=0.14.5" } }, "@vueuse/metadata": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.1.2.tgz", - "integrity": "sha512-3mc5BqN9aU2SqBeBuWE7ne4OtXHoHKggNgxZR2K+zIW4YLsy6xoZ4/9vErQs6tvoKDX6QAqm3lvsrv0mczAwIQ==" + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.3.0.tgz", + "integrity": "sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==", + "dev": true }, "@vueuse/shared": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.1.2.tgz", - "integrity": "sha512-1uoUTPBlgyscK9v6ScGeVYDDzlPSFXBlxuK7SfrDGyUTBiznb3mNceqhwvZHjtDRELZEN79V5uWPTF1VDV8svA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.3.0.tgz", + "integrity": "sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==", "requires": { - "vue-demi": ">=0.14.0" + "vue-demi": ">=0.14.5" } }, "@webassemblyjs/ast": { diff --git a/package.json b/package.json index ffffb82c0a8..8f414c2b750 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "@tiptap/pm": "^2.0.4", "@tiptap/suggestion": "^2.0.4", "@tiptap/vue-2": "^2.0.4", + "@vueuse/shared": "^10.3.0", "debounce": "^1.2.1", "escape-html": "^1.0.3", "highlight.js": "^11.8.0", @@ -123,6 +124,7 @@ "@vitejs/plugin-vue2": "^2.2.0", "@vue/test-utils": "^1.3.0 <2", "@vue/vue2-jest": "^29.2.4", + "@vueuse/core": "^10.3.0", "cypress": "^12.17.2", "eslint-plugin-cypress": "^2.13.3", "identity-obj-proxy": "^3.0.0", diff --git a/src/components/Menu/MenuBar.vue b/src/components/Menu/MenuBar.vue index c2052735839..409667610c7 100644 --- a/src/components/Menu/MenuBar.vue +++ b/src/components/Menu/MenuBar.vue @@ -71,9 +71,9 @@