Skip to content

fix: adjust folder popup width for small app counts - #1854

Open
18202781743 wants to merge 1 commit into
linuxdeepin:develop/2500u3from
18202781743:agent/bugfix/384231
Open

18202781743 wants to merge 1 commit into
linuxdeepin:develop/2500u3from
18202781743:agent/bugfix/384231

Conversation

@18202781743

Copy link
Copy Markdown
Contributor

fix: adjust folder popup width for small app counts

Root Cause

In panels/dock/taskmanager/package/FolderPopup.qml, the columns property always returned 4 when itemCount <= 8, and minimumWidth was hardcoded to 420px. For folders with fewer than 4 apps (e.g. 2 apps), the grid used 4 columns and the minimum width forced the panel to 420px — the maximum size — instead of the actual content width (216px for 2 apps).

Evidence: Python math reproduction (repro/before.log) confirmed: for itemCount=2, current width=420px vs expected width=216px. Flip experiment (repro/contrast.log) confirmed that fixing both columns and minimumWidth eliminates the anomaly, and reverting restores it.

Fix

  1. columns: when itemCount < 4, use Math.max(1, itemCount) so the column count matches the actual number of apps; for itemCount >= 4, behavior is unchanged (4 for ≤8, 5 for >8).
  2. minimumWidth: changed from 420 to 0 so the panel width follows the actual content size instead of being forced to a minimum.

Change Safety

Risk level: Low (see change-safety.md)

  • Only two QML readonly property values are modified — no function signature changes, no deleted interfaces, no call-site changes.
  • columns and minimumWidth are internal to FolderPopup.qml, referenced only by rows, Grid.columns, ItemDelegate.width, and the width binding — all adapt automatically.
  • hasProviderContent=true path uses contentLoader.item.implicitWidth and is unaffected.
  • No new symbols or functions introduced.

Business Impact

  • Affected feature: Dock taskbar → fashion mode → app group folder popup.
  • Behavioral change: Folders with 1–3 apps now display compact width (120/216/312px instead of 420px). Folders with 4+ apps are unchanged.
  • Regression risk: Minimal — normal path (itemCount >= 4) produces identical results.

Verification Suggestions

  1. Add 1, 2, 3 apps to an app group on the dock; click to open the folder popup; verify panel width matches content (no excess empty space).
  2. Add 4+ apps to an app group; verify panel width and layout are unchanged.
  3. Verify popup positioning remains within the screen work area for all app counts.

fix: 修复应用组面板在应用数量较少时宽度过大的问题

根因

panels/dock/taskmanager/package/FolderPopup.qml 中 columns 属性在 itemCount <= 8 时始终取 4 列,且 minimumWidth 硬编码为 420px。当应用组内应用数少于 4 个(如 2 个)时,网格仍使用 4 列,最小宽度强制面板为 420px(最大尺寸),而非实际内容宽度(2 个应用应为 216px)。

证据:Python 数学复现(repro/before.log)确认:itemCount=2 时当前宽度=420px,期望宽度=216px。翻转实验(repro/contrast.log)确认同时修改 columns 和 minimumWidth 后异常消失,恢复后异常复现。

修复方案

  1. columns:itemCount < 4 时取 Math.max(1, itemCount),列数与实际应用数一致;itemCount >= 4 时行为不变(≤8 取 4 列,>8 取 5 列)。
  2. minimumWidth:从 420 改为 0,使面板宽度跟随实际内容尺寸。

改动安全评估

风险等级:低(见 change-safety.md)

  • 仅修改两个 QML 只读属性值,无函数签名变更、无接口删除、无调用方变更。
  • columns 和 minimumWidth 仅在 FolderPopup.qml 内部使用,被 rows、Grid.columns、ItemDelegate.width 和 width 绑定引用,改动后自动适配。
  • hasProviderContent=true 路径走 contentLoader.item.implicitWidth,不受影响。
  • 无新增接口或函数。

业务影响范围

  • 受影响功能:任务栏 → 时尚模式 → 应用组弹出面板。
  • 行为变化:1–3 个应用的面板宽度变为 120/216/312px(原为 420px);4 个及以上应用不变。
  • 回归风险:极低 — 正常路径(itemCount >= 4)结果完全一致。

验证建议

  1. 在任务栏添加 1、2、3 个应用至应用组,点击展开面板,验证宽度与内容匹配(无多余空白)。
  2. 添加 4 个及以上应用,验证面板宽度和布局无变化。
  3. 验证不同应用数量下面板定位仍在屏幕工作区内。

PMS: BUG-384231

1. Root cause: columns property always returned 4 for itemCount <= 8,
   and minimumWidth was hardcoded to 420, so folders with fewer than
   4 apps still rendered at full 420px width
2. Fix: columns now uses actual item count when itemCount < 4, and
   minimumWidth is set to 0 to let width follow real content size
3. Impact: folders with 1-3 apps show compact width (120/216/312px
   instead of 420px); folders with 4+ apps are unchanged

Log: fix folder popup showing oversized panel for small app groups

Influence:
1. Test folder popup with 1, 2, 3 apps and verify panel width matches
   content
2. Test folder popup with 4+ apps and verify no regression
3. Verify popup positioning remains within screen work area

fix: 修复应用组面板在应用数量较少时宽度过大的问题

1. 根因:columns 属性在 itemCount <= 8 时始终取 4 列,且
   minimumWidth 硬编码为 420,导致应用数少于 4 个时面板仍为
   420px 最大宽度
2. 方案:columns 在 itemCount < 4 时按实际应用数取列数,
   minimumWidth 设为 0 使宽度跟随实际内容尺寸
3. 影响:1-3 个应用的面板宽度分别变为 120/216/312px(原为
   420px);4 个及以上应用的行为不变

Log: 修复应用组面板在应用数量较少时宽度过大的问题

Influence:
1. 测试 1、2、3 个应用时面板宽度是否与内容匹配
2. 测试 4 个及以上应用时面板无回归
3. 验证面板定位仍在屏幕工作区内

PMS: BUG-384231
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

deepin-ci-robot commented Nov 24, 2026 •

Copy link
Copy Markdown

⚠️ OBS CI 构建警告日志 (Commit: f93899d6)

提示:以下为 OBS CI 构建中 Lintian 检测到的警告信息,默认折叠,点击展开查看详情。完整日志请参阅对应构建状态链接。

deepin_develop / aarch64 (Lintian 警告: 15 条)
[  712s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[  712s] N: 
[  712s] N:   The desktop entry specifies a Command that does not match any of the
[  712s] N:   executables shipped in the package.
[  712s] N:   
[  712s] N:   This condition is often caused by a typo, or the desktop file was not
[  712s] N:   updated after the installed path of the executable was modified.
[  712s] N:   
[  712s] N:   Packages should ship executables that are used as commands in desktop
[  712s] N:   files.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: menu-format
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/aarch64-linux-gnu/libds-notification-shared.so.6.2.1 [usr/lib/aarch64-linux-gnu/libds-notification-shared.so]
[  712s] N: 
[  712s] N:   Although this package is not a "-dev" package, it installs a
[  712s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[  712s] N:   library. When the link doesn't include the version number, it is used by
[  712s] N:   the linker when other programs are built against this shared library.
[  712s] N:   
[  712s] N:   Shared libraries are supposed to place such symbolic links in their
[  712s] N:   respective "-dev" packages, so it is a bug to include it with the main
[  712s] N:   library package.
[  712s] N:   
[  712s] N:   However, if this is a small package which includes the runtime and the
[  712s] N:   development libraries, this is not a bug. In the latter case, please
[  712s] N:   override this warning.
[  712s] N: 
[  712s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[  712s] N:   Manual for details.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: libraries/shared/links
[  712s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[  712s] N: 
[  712s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[  712s] N:   a manual page
[  712s] N:   
[  712s] N:   Note that though the man program has the capability to check for several
[  712s] N:   program names in the NAMES section, each of these programs should have its
[  712s] N:   own manual page (a symbolic link to the appropriate manual page is
[  712s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[  712s] N:   support this.
[  712s] N:   
[  712s] N:   If the name of the manual page differs from the binary by case, man may be
[  712s] N:   able to find it anyway; however, it is still best practice to match the
[  712s] N:   exact capitalization of the executable in the manual page.
[  712s] N:   
[  712s] N:   If the manual pages are provided by another package on which this package
[  712s] N:   depends, Lintian may not be able to determine that manual pages are
[  712s] N:   available. In this case, after confirming that all binaries do have manual
[  712s] N:   pages after this package and its dependencies are installed, please add a
[  712s] N:   Lintian override.
[  712s] N: 
[  712s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[  712s] N:   for details.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: documentation/manual
[  712s] N:   Renamed from: binary-without-manpage
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[  712s] N: 
[  712s] N:   When you NMU a package, that fact should be mentioned on the first line in
[  712s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[  712s] N:   insensitive).
[  712s] N:   
[  712s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  712s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  712s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  712s] N:   package (not intended for Debian), you can suppress this warning by
[  712s] N:   putting "local" in the version number or "local package" on the first line
[  712s] N:   of the changelog entry.
[  712s] N: 
[  712s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[  712s] N:   Developer's Reference for details.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: nmu
[  712s] N:   Renamed from: changelog-should-mention-nmu
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared6
[  712s] N: 
[  712s] N:   The package name of a library package should usually reflect the soname of
[  712s] N:   the included library. The package name can determined from the library
[  712s] N:   file name with the following code snippet:
[  712s] N:   
[  712s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[  712s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: libraries/shared/soname
[  712s] N: 
[  712s] N:
[  712s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[  712s] N:
[  712s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[  712s] N:
[  712s] W: dde-shell source: source-nmu-has-incorrect-version-number 6.2.1+u006 [debian/changelog:1]
[  712s] N: 
[  712s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[  712s] N:   native package). This is to prevent stealing version numbers from the
[  712s] N:   maintainer.
[  712s] N:   
[  712s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  712s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  712s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  712s] N:   package (not intended for Debian), you can suppress this warning by
[  712s] N:   putting "local" in the version number or "local package" on the first line
[  712s] N:   of the changelog entry.
[  712s] N: 
[  712s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[  712s] N:   Developer's Reference for details.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: nmu
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell: unknown-section DDE
[  712s] N: 
[  712s] N:   The "Section:" field in this package's control file is not one of the
[  712s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[  712s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[  712s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[  712s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[  712s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[  712s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[  712s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[  712s] N:   
[  712s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[  712s] N:   "non-free-firmware/" if the package is in the according archive area.
[  712s] N: 
[  712s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[  712s] N:   details.
[  712s] N: 
[  712s] N:   Visibility: warning
[  712s] N:   Show-Always: no
[  712s] N:   Check: fields/section
[  712s] N: 
[  712s] N:
[  712s] W: dde-shell-example: unknown-section DDE
[  712s] N:
[  712s] W: libdde-shell: unknown-section DDE
[  712s] N:
[  712s] W: libdde-shell-dev: unknown-section DDE
[  712s] N:
[  712s] W: libdde-shell-dock: unknown-section DDE
[  712s] N:
[  712s] W: libdde-shell-dock-dev: unknown-section DDE
[  713s] Warning: mkbaselibs missing in build root, skipping baselibs
deepin_develop / x86_64 (Lintian 警告: 15 条)
[  392s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[  392s] N: 
[  392s] N:   The desktop entry specifies a Command that does not match any of the
[  392s] N:   executables shipped in the package.
[  392s] N:   
[  392s] N:   This condition is often caused by a typo, or the desktop file was not
[  392s] N:   updated after the installed path of the executable was modified.
[  392s] N:   
[  392s] N:   Packages should ship executables that are used as commands in desktop
[  392s] N:   files.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: menu-format
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libds-notification-shared.so.6.2.1 [usr/lib/x86_64-linux-gnu/libds-notification-shared.so]
[  392s] N: 
[  392s] N:   Although this package is not a "-dev" package, it installs a
[  392s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[  392s] N:   library. When the link doesn't include the version number, it is used by
[  392s] N:   the linker when other programs are built against this shared library.
[  392s] N:   
[  392s] N:   Shared libraries are supposed to place such symbolic links in their
[  392s] N:   respective "-dev" packages, so it is a bug to include it with the main
[  392s] N:   library package.
[  392s] N:   
[  392s] N:   However, if this is a small package which includes the runtime and the
[  392s] N:   development libraries, this is not a bug. In the latter case, please
[  392s] N:   override this warning.
[  392s] N: 
[  392s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[  392s] N:   Manual for details.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: libraries/shared/links
[  392s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[  392s] N: 
[  392s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[  392s] N:   a manual page
[  392s] N:   
[  392s] N:   Note that though the man program has the capability to check for several
[  392s] N:   program names in the NAMES section, each of these programs should have its
[  392s] N:   own manual page (a symbolic link to the appropriate manual page is
[  392s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[  392s] N:   support this.
[  392s] N:   
[  392s] N:   If the name of the manual page differs from the binary by case, man may be
[  392s] N:   able to find it anyway; however, it is still best practice to match the
[  392s] N:   exact capitalization of the executable in the manual page.
[  392s] N:   
[  392s] N:   If the manual pages are provided by another package on which this package
[  392s] N:   depends, Lintian may not be able to determine that manual pages are
[  392s] N:   available. In this case, after confirming that all binaries do have manual
[  392s] N:   pages after this package and its dependencies are installed, please add a
[  392s] N:   Lintian override.
[  392s] N: 
[  392s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[  392s] N:   for details.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: documentation/manual
[  392s] N:   Renamed from: binary-without-manpage
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[  392s] N: 
[  392s] N:   When you NMU a package, that fact should be mentioned on the first line in
[  392s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[  392s] N:   insensitive).
[  392s] N:   
[  392s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  392s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  392s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  392s] N:   package (not intended for Debian), you can suppress this warning by
[  392s] N:   putting "local" in the version number or "local package" on the first line
[  392s] N:   of the changelog entry.
[  392s] N: 
[  392s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[  392s] N:   Developer's Reference for details.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: nmu
[  392s] N:   Renamed from: changelog-should-mention-nmu
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared6
[  392s] N: 
[  392s] N:   The package name of a library package should usually reflect the soname of
[  392s] N:   the included library. The package name can determined from the library
[  392s] N:   file name with the following code snippet:
[  392s] N:   
[  392s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[  392s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: libraries/shared/soname
[  392s] N: 
[  392s] N:
[  392s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[  392s] N:
[  392s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[  392s] N:
[  392s] W: dde-shell source: source-nmu-has-incorrect-version-number 6.2.1+u006 [debian/changelog:1]
[  392s] N: 
[  392s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[  392s] N:   native package). This is to prevent stealing version numbers from the
[  392s] N:   maintainer.
[  392s] N:   
[  392s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  392s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  392s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  392s] N:   package (not intended for Debian), you can suppress this warning by
[  392s] N:   putting "local" in the version number or "local package" on the first line
[  392s] N:   of the changelog entry.
[  392s] N: 
[  392s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[  392s] N:   Developer's Reference for details.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: nmu
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell: unknown-section DDE
[  392s] N: 
[  392s] N:   The "Section:" field in this package's control file is not one of the
[  392s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[  392s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[  392s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[  392s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[  392s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[  392s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[  392s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[  392s] N:   
[  392s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[  392s] N:   "non-free-firmware/" if the package is in the according archive area.
[  392s] N: 
[  392s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[  392s] N:   details.
[  392s] N: 
[  392s] N:   Visibility: warning
[  392s] N:   Show-Always: no
[  392s] N:   Check: fields/section
[  392s] N: 
[  392s] N:
[  392s] W: dde-shell-example: unknown-section DDE
[  392s] N:
[  392s] W: libdde-shell: unknown-section DDE
[  392s] N:
[  392s] W: libdde-shell-dev: unknown-section DDE
[  392s] N:
[  392s] W: libdde-shell-dock: unknown-section DDE
[  392s] N:
[  392s] W: libdde-shell-dock-dev: unknown-section DDE
[  392s] Warning: mkbaselibs missing in build root, skipping baselibs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants