From d6a2da402c235a1538e62a35ab432096b362b2c9 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 12:44:22 +0200 Subject: [PATCH 1/7] fix(webpack): set global appVersion --- webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 0c16d61..5cfd868 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,6 +7,7 @@ const NodePolyfillPlugin = require('node-polyfill-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin') const appName = 'side_menu' +const appVersion = '6.x' const buildMode = process.env.NODE_ENV const isDev = buildMode === 'development' @@ -80,6 +81,7 @@ module.exports = { new webpack.DefinePlugin({ appName: JSON.stringify(appName), + appVersion: JSON.stringify(appVersion), }), ], From cc841570eccbfcea23d1f090d4160be5e9b2d4cc Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 12:59:37 +0200 Subject: [PATCH 2/7] fix(ui): only apply always-displayed display css rules when the menu is displayed --- src/scss/menu.scss | 10 ++++++++++ templates/css/stylesheet.php | 12 ------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/scss/menu.scss b/src/scss/menu.scss index 097c002..29685d2 100644 --- a/src/scss/menu.scss +++ b/src/scss/menu.scss @@ -363,6 +363,16 @@ right: 0 !important; margin-left: 0 !important; } + + #content { + left: 53px; + width: calc(100% - (var(--body-container-margin) * 2) - 62px); + } + + #content-vue { + width: calc(100% - (var(--body-container-margin) * 2) - 60px); + margin-left: 11px; + } } @media screen and (max-width: 1024px) { diff --git a/templates/css/stylesheet.php b/templates/css/stylesheet.php index 5bdc08b..b670f53 100644 --- a/templates/css/stylesheet.php +++ b/templates/css/stylesheet.php @@ -117,15 +117,3 @@ body[data-theme-light], body[data-theme-light-highcontrast] { font-size: 16px; } - - - #content { - left: 53px; - width: calc(100% - (var(--body-container-margin) * 2) - 62px); - } - - #content-vue { - width: calc(100% - (var(--body-container-margin) * 2) - 60px); - margin-left: 11px; - } - From 1a8063bd9410fb93c7dde3646650f53c962a8d50 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 13:00:51 +0200 Subject: [PATCH 3/7] doc: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ad64b..3605c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +### Fixed + +- fix(ui): only apply always-displayed display css rules when the menu is displayed + ## 6.0.0 ### Added From 7033569bed877964523cddc9aa437bff7d30f7e5 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 15:50:57 +0200 Subject: [PATCH 4/7] feat(standard-menu): add unified-search-input size handling --- src/menus/StandardMenu.vue | 23 +++++++++++++++++------ src/scss/menu.scss | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/menus/StandardMenu.vue b/src/menus/StandardMenu.vue index 81b9ff9..5e81c80 100644 --- a/src/menus/StandardMenu.vue +++ b/src/menus/StandardMenu.vue @@ -62,8 +62,9 @@ along with this program. If not, see . { const appLimit = () => { const headerStart = document.querySelector('#header .header-start') const headerEnd = document.querySelector('#header .header-end') + const unifiedSearch = document.querySelector('#header .unified-search-input') const body = document.querySelector('body') - let size = (headerEnd ? headerEnd.offsetWidth : 0) + 70 + let totalWidth = body.offsetWidth + let otherElementsWidth = headerEnd ? headerEnd.offsetWidth : 0 + + if (unifiedSearch && headerEnd.offsetWidth < unifiedSearch.offsetWidth) { + otherElementsWidth = totalWidth - unifiedSearch.getBoundingClientRect().left + } + + let maxWidth = totalWidth - otherElementsWidth if (headerStart) { Array.from(headerStart.children).forEach((child) => { if (child.id !== 'app-menu-container') { - size += child.offsetWidth + maxWidth -= child.offsetWidth } }) } - return Math.max(0, Math.floor((body.offsetWidth - size) / 70)) + return Math.max(0, Math.floor(maxWidth / 70)) } const makeStyle = (app) => { @@ -161,8 +170,9 @@ const computeLists = () => { } const reComputeLists = (delay) => { - window.clearTimeout(resizeTimeout) - resizeTimeout = window.setTimeout(computeLists, delay || 100) + window.clearTimeout(resizeTimeout) + resizeTimeout = window.setTimeout(computeLists, delay || 100) + document.querySelector('html').classList.toggle('cm-standardmenu-popover', popoverAppList.value.length > 0) } onMounted(async () => { @@ -177,6 +187,7 @@ onMounted(async () => { setApps(await navStore.getCoreApps()) + reComputeLists(500) window.addEventListener('resize', reComputeLists) }) diff --git a/src/scss/menu.scss b/src/scss/menu.scss index 29685d2..21e5d6f 100644 --- a/src/scss/menu.scss +++ b/src/scss/menu.scss @@ -395,6 +395,16 @@ padding: 10px 0; } } + + #header { + .unified-search-input { + width: 80px !important; + + .unified-search-input__label { + display: none; + } + } + } } @media screen and (min-width: 1024px) { @@ -609,3 +619,11 @@ $header-icon-size: 20px; display: none; } } + +.cm-standardmenu-popover { + #header { + .unified-search-input:not(.unified-search-input--mobile) { + position: unset !important; + } + } +} From e81f0e4b76d9cd94b1360c690f9b36ddb6653113 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 15:52:34 +0200 Subject: [PATCH 5/7] doc: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3605c3a..5f091f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +### Added + +- feat(standard-menu): add unified-search-input size handling + ### Fixed - fix(ui): only apply always-displayed display css rules when the menu is displayed From c24bb6f8c892f4f6649311e787563cba26fdd3d4 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 16:26:06 +0200 Subject: [PATCH 6/7] feat(standard-menu): add unified-search-input size handling --- src/menus/StandardMenu.vue | 20 +++++++------------- src/scss/menu.scss | 8 +++----- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/menus/StandardMenu.vue b/src/menus/StandardMenu.vue index 5e81c80..c12e782 100644 --- a/src/menus/StandardMenu.vue +++ b/src/menus/StandardMenu.vue @@ -140,10 +140,10 @@ const appLimit = () => { let otherElementsWidth = headerEnd ? headerEnd.offsetWidth : 0 if (unifiedSearch && headerEnd.offsetWidth < unifiedSearch.offsetWidth) { - otherElementsWidth = totalWidth - unifiedSearch.getBoundingClientRect().left + otherElementsWidth += unifiedSearch.offsetWidth } - let maxWidth = totalWidth - otherElementsWidth + let maxWidth = body.offsetWidth - otherElementsWidth if (headerStart) { Array.from(headerStart.children).forEach((child) => { @@ -153,7 +153,7 @@ const appLimit = () => { }) } - return Math.max(0, Math.floor(maxWidth / 70)) + return Math.max(0, Math.floor(maxWidth / 60)) } const makeStyle = (app) => { @@ -165,14 +165,9 @@ const makeStyle = (app) => { } const computeLists = () => { - mainAppList.value = appList.value.slice(0, appLimit()) - popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order) -} - -const reComputeLists = (delay) => { - window.clearTimeout(resizeTimeout) - resizeTimeout = window.setTimeout(computeLists, delay || 100) - document.querySelector('html').classList.toggle('cm-standardmenu-popover', popoverAppList.value.length > 0) + const limit = appLimit() + mainAppList.value = appList.value.slice(0, limit) + popoverAppList.value = appList.value.slice(limit).sort((a, b) => a.order - b.order) } onMounted(async () => { @@ -187,8 +182,7 @@ onMounted(async () => { setApps(await navStore.getCoreApps()) - reComputeLists(500) - window.addEventListener('resize', reComputeLists) + window.setInterval(computeLists, 100) }) diff --git a/src/scss/menu.scss b/src/scss/menu.scss index 21e5d6f..5680536 100644 --- a/src/scss/menu.scss +++ b/src/scss/menu.scss @@ -620,10 +620,8 @@ $header-icon-size: 20px; } } -.cm-standardmenu-popover { - #header { - .unified-search-input:not(.unified-search-input--mobile) { - position: unset !important; - } +#header { + .unified-search-input:not(.unified-search-input--mobile) { + position: unset !important; } } From 9eab478c3609cb6088bcb219adfaab9fc9fed861 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 18 Jul 2026 16:28:51 +0200 Subject: [PATCH 7/7] chore(info): set version --- CHANGELOG.md | 2 ++ appinfo/info.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f091f9..a9da417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [Unreleased] +## 6.0.1 + ### Added - feat(standard-menu): add unified-search-input size handling diff --git a/appinfo/info.xml b/appinfo/info.xml index ac89454..2f8750e 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -30,7 +30,7 @@ Notice Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). ]]> - 6.0.0 + 6.0.1 agpl Simon Vieille SideMenu