Skip to content

fix: improve search result UI and navigation - #748

Open
kt286 wants to merge 1 commit into
linuxdeepin:masterfrom
kt286:split/fix-search-result
Open

fix: improve search result UI and navigation#748
kt286 wants to merge 1 commit into
linuxdeepin:masterfrom
kt286:split/fix-search-result

Conversation

@kt286

@kt286 kt286 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • Overhaul SearchResultWindow navigation with StackView for push/pop transitions
  • Adjust grid cell sizes for better artist and album display
  • Add requestClose signal and padding/radius improvements to SearchResultDialog
  • Remove sidebar auto-uncheck behavior when entering search page
  • Fix connection handlers for artist and album detail navigation

fix: 优化搜索结果UI和导航

  • 使用StackView重构SearchResultWindow导航,支持推入/弹出过渡动画
  • 调整网格单元格大小以改善歌手和专辑显示
  • 为SearchResultDialog添加requestClose信号和内边距/圆角改进
  • 移除进入搜索页面时侧边栏自动取消勾选的行为
  • 修复歌手和专辑详情页导航的连接处理

主要解决几个问题
1、搜索结果中的专辑、艺人点击三个点,查看详情无法跳转到详情界面
2、点击搜索结果中的艺人、专辑后,再点主界面左侧的艺人、专辑,有可能会没有蓝色高亮
3、参考艺人,专辑列表,给搜索结果适配动画和上一页下一页

Summary by Sourcery

Improve search results navigation and UI responsiveness across the search window, dialog, and sidebar.

New Features:

  • Introduce a StackView-based navigation flow for the search results window with animated push/pop transitions.
  • Add a dedicated requestClose signal to the search results popup dialog to allow external control of closing.

Bug Fixes:

  • Correct artist and album detail navigation handlers to pass the proper data objects.
  • Fix nested artist and album sublist navigation so that returning to upper-level views works reliably.
  • Stop automatically unchecking the sidebar selection when navigating to the search page.

Enhancements:

  • Refine artist and album search result grid dimensions and spacing for better visual layout.
  • Add padding and rounded corners to search result dialog items for improved appearance.
  • Track selected artist and album names and integrate global navigation state to drive search result subviews.

Summary by Sourcery

Improve search result navigation and presentation with animated detail transitions and more reliable selection behavior.

New Features:

  • Add animated stack-based navigation for search result lists and detail views.
  • Expose a close-request signal for search result dialogs.],
  • bug_fixes=[

Bug Fixes:

  • Fix artist and album detail navigation and upper-level view restoration.
  • Preserve sidebar selection state when entering search results.

Enhancements:

  • Improve artist and album result layouts with revised sizing, spacing, padding, and rounded corners.

@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 @kt286, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kt286

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

Copy link
Copy Markdown

Hi @kt286. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sourcery-ai

sourcery-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Refactors the search results page to use a StackView-based navigation with animated push/pop transitions, updates artist/album grid layouts, improves the search suggestion dialog interaction and styling, and adjusts sidebar behavior and navigation signal wiring for artist/album detail views.

Sequence diagram for StackView-based search result navigation

sequenceDiagram
    actor User
    participant ArtistGridDelegate
    participant SearchResultWindow
    participant globalVariant
    participant navigationStackView
    participant ArtistSublistView

    User->>ArtistGridDelegate: onItemDoubleClicked(artistData)
    ArtistGridDelegate->>SearchResultWindow: itemDoubleClicked(artistData)
    activate SearchResultWindow
    SearchResultWindow->>SearchResultWindow: onItemDoubleClicked(data)
    SearchResultWindow->>SearchResultWindow: artistData = data
    SearchResultWindow->>SearchResultWindow: selectedArtistName = data.name
    SearchResultWindow->>globalVariant: globalSwitchButtonStatus = 2
    deactivate SearchResultWindow

    globalVariant-->>SearchResultWindow: onSwitchTypeChanged(switchType = 2)
    activate SearchResultWindow
    SearchResultWindow->>navigationStackView: push(artistSublistView)
    navigationStackView-->>ArtistSublistView: create and show
    deactivate SearchResultWindow

    globalVariant-->>SearchResultWindow: onReturnUpperlevelView()
    activate SearchResultWindow
    SearchResultWindow->>SearchResultWindow: returnUpperlevelView()
    SearchResultWindow->>globalVariant: globalSwitchButtonStatus = 0
    SearchResultWindow->>navigationStackView: pop(initialItem)
    deactivate SearchResultWindow
Loading

Sequence diagram for SearchResultDialog item selection and close

sequenceDiagram
    actor User
    participant SearchResultDialog
    participant ItemDelegate

    User->>ItemDelegate: MouseArea.onClicked
    ItemDelegate->>SearchResultDialog: searchItemTriggered(value, type)
    ItemDelegate->>SearchResultDialog: requestClose()
    SearchResultDialog-->>SearchResultDialog: Popup close handled externally
Loading

File-Level Changes

Change Details Files
Refactor SearchResultWindow navigation to StackView with animated push/pop and global switch handling.
  • Replace root Rectangle content container with a StackView that manages navigation and visibility based on the current tab index.
  • Wrap the existing header, tabs, and StackLayout content into the StackView.initialItem to serve as the main search results page.
  • Introduce push/pop transition animations (scale and opacity) for navigating between views within the StackView.
  • Add switchType, selectedArtistName, and selectedAlbumName properties and update onItemDoubleClicked to store selected data and modify global switch status.
  • Handle onSwitchTypeChanged to push/pop artist and album sublist views (ArtistSublistView/AlbumSublistView) based on globalVariant.globalSwitchButtonStatus and the active tab.
  • Expose returnUpperlevelView() to pop back to the initial search results view and reset global navigation state, and wire it to globalVariant via a new Connections block.
src/music-player/mainwindow/SearchResultWindow.qml
Adjust artist and album grid layouts in the search results for better visual presentation.
  • Change artist GridView to live inside an Item, adjust width calculation to use 208px cells, and set cellWidth/cellHeight to 208x230 with a small top margin and header spacing.
  • Change album GridView similarly to use 208px cell width and 242px cell height, with header spacing and simplified anchoring, while keeping ScrollBar and clipping behavior.
  • Keep AllMusicListView but simplify layout bindings (remove explicit width/height) to rely on parent layout sizing.
src/music-player/mainwindow/SearchResultWindow.qml
Fix connection handlers for navigating to artist and album detail views from context menus and global actions.
  • Update itemDoubleClicked signal signature from itemDoubleClicked(var artistData) to itemDoubleClicked(var data) and adjust internal usage to pass either artistData or albumData appropriately.
  • Correct Connections handlers from artistMoreMenu and albumMoreMenu to explicitly define onViewArtistDatails and onViewAlbumDatails functions that call searchRootRect.itemDoubleClicked with the correct payload type.
  • Add a new Connections block to globalVariant that forwards a ReturnUpperlevelView signal to the SearchResultWindow.returnUpperlevelView() function.
src/music-player/mainwindow/SearchResultWindow.qml
Tweak search suggestion dialog (SearchResultDialog) interaction and visual styling.
  • Add a requestClose() signal on the popup to decouple close control from item delegates.
  • Replace direct visibility manipulation (searchResultRect.visible = false) in click handlers with requestClose() so the dialog can be closed by its owner/controller.
  • Introduce consistent padding (left/right/top/bottom = 8) around the dialog content to improve layout spacing.
  • Set a 6px corner radius on list item rectangles to soften visual appearance.
  • Remove leftover debug/commented logging and unnecessary UI noise while keeping behavior intact.
src/music-player/dialogs/SearchResultDialog.qml
Simplify SideBarItem scrolling behavior and stop auto-unchecking the sidebar when entering the search page.
  • Convert the onContentYChanged handler on musicBaseScrollView.contentItem into a named function in the Connections block while preserving its behavior of updating the dropArea hover index for playlist type.
  • Comment out the Component.onCompleted connection that listened to globalVariant.curListPageChanged and auto-unchecked the current sidebar item when the search page was entered, preventing unintended deselection.
  • Update the SPDX header to extend copyright years to 2026 and remove an obsolete copyright line.
src/music-player/musicbaseandsonglist/SideBarItem.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

@kt286
kt286 force-pushed the split/fix-search-result branch 4 times, most recently from 8f30dba to ad17847 Compare August 11, 2026 01:00
@deepin-bot

deepin-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 7.0.63
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #762

@deepin-bot

deepin-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 7.0.64
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #765

@kt286
kt286 force-pushed the split/fix-search-result branch from ad17847 to caeed40 Compare August 18, 2026 05:28
@deepin-bot

deepin-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 7.0.65
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #768

@deepin-bot

deepin-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 7.0.66
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #779

- Overhaul SearchResultWindow navigation with StackView for push/pop transitions
- Adjust grid cell sizes for better artist and album display
- Add requestClose signal and padding/radius improvements to SearchResultDialog
- Remove sidebar auto-uncheck behavior when entering search page
- Fix connection handlers for artist and album detail navigation

fix: 优化搜索结果UI和导航

- 使用StackView重构SearchResultWindow导航,支持推入/弹出过渡动画
- 调整网格单元格大小以改善歌手和专辑显示
- 为SearchResultDialog添加requestClose信号和内边距/圆角改进
- 移除进入搜索页面时侧边栏自动取消勾选的行为
- 修复歌手和专辑详情页导航的连接处理
@kt286
kt286 force-pushed the split/fix-search-result branch from caeed40 to 2ba587a Compare August 21, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants