Skip to content

fix(album): restore clickability of empty-state buttons - #778

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wyu71:master
Aug 19, 2026
Merged

fix(album): restore clickability of empty-state buttons#778
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wyu71:master

Conversation

@wyu71

@wyu71 wyu71 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Raise AlbumDefaultPage above the full-page DropArea.

Log: 修复专辑默认页按钮无法点击问题
PMS: BUG-374225
Influence: 确保专辑为空时,默认页中的添加歌曲和打开文件夹按钮可以正常响应点击。

Summary by Sourcery

Bug Fixes:

  • Restore click handling for the empty album page’s add-song and open-folder buttons.

Raise AlbumDefaultPage above the full-page DropArea.

Log: 修复专辑默认页按钮无法点击问题
PMS: BUG-374225
Influence: 确保专辑为空时,默认页中的添加歌曲和打开文件夹按钮可以正常响应点击。

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @wyu71, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR ensures the album empty-state controls remain clickable by adjusting their stacking order relative to the full-page DropArea.

Flow diagram for AlbumView empty-state layering fix

flowchart TD
    AlbumView[AlbumView]
    AlbumDefaultPage["AlbumDefaultPage (z:1)"]
    DropArea[FullPage DropArea]

    AlbumView --> AlbumDefaultPage
    AlbumView --> DropArea

    AlbumDefaultPage -->|captures clicks on empty-state buttons| UserInteraction
    DropArea -->|receives drag and drop events| UserInteraction
Loading

File-Level Changes

Change Details Files
Ensure the album empty-state default page is rendered above the full-page DropArea so its buttons are clickable.
  • Set an explicit z value on the AlbumDefaultPage item to raise its stacking order.
  • Added a clarifying inline comment explaining the purpose of the z property change.
src/music-player/albumlist/AlbumView.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:95分

■ 【总体评价】

代码修复了QML界面层级冲突导致的交互异常问题,逻辑清晰且无安全风险
修复方案精准有效且添加了必要注释,仅因修改范围极小未达满分

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

src/music-player/albumlist/AlbumView.qmlAlbumDefaultPage 组件中新增 z: 1 属性,用于调整组件的 Z 轴层级。QML 语法支持通过 z 属性控制兄弟节点的渲染和事件传递顺序,修改合法有效,解决了被全页面 DropArea 遮挡导致无法响应鼠标/触摸事件的问题。
潜在问题:无
建议:无需修改

  • 2.代码质量(优秀)✓

新增了注释 // Keep empty-state controls above the full-page DropArea below.,准确解释了设置 z: 1 的原因,有助于后续维护人员快速理解代码意图,符合代码规范。
潜在问题:无
建议:无需修改

  • 3.代码性能(无性能问题)✓

调整 z 属性仅影响渲染树的绘制顺序和事件分发优先级,不会引入额外的计算开销或内存占用。
潜在问题:无
建议:无需修改

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改仅涉及前端 UI 层级调整,不涉及任何外部输入处理、网络请求或敏感数据操作,不存在安全风险。

  • 建议:无需修改

■ 【改进建议代码示例】

// 当前代码已为最佳实践,无需额外修改
AlbumDefaultPage {
    id: defaultPage
    // Keep empty-state controls above the full-page DropArea below.
    z: 1
    width: toolButtonItem.width; height: contenWindow.height - toolButtonItem.height
    anchors.left: toolButtonItem.left
    anchors.top: toolButtonItem.bottom;
}

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wyu71

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

@wyu71

wyu71 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 9d0ad7b into linuxdeepin:master Aug 19, 2026
17 checks passed
@wyu71

wyu71 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unknown)

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.

3 participants