Skip to content

Conversation

@wweyoung
Copy link

支持歌曲详情点击歌名、作者、专辑快捷搜索

@maotoumao maotoumao requested review from Copilot and maotoumao March 30, 2025 04:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds quick search functionality from song details by enabling taps on song name, author, and album, and integrates a new search type state (typeAtom) into the search flow.

  • Introduces a new atom (typeAtom) to keep track of the search type.
  • Updates the search page to pick up URL parameters (query and type) and trigger search automatically.
  • Enhances song item options to support navigation to the search page via onPress and onLongPress events.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/pages/searchPage/store/atoms.ts Added typeAtom to support search type.
src/pages/searchPage/index.tsx Updated to extract type from URL parameters and trigger search accordingly.
src/pages/searchPage/components/resultPanel/index.tsx Updated initial tab selection logic based on the new typeAtom state.
src/pages/searchPage/components/navBar.tsx Minor adjustment in input autofocus based on query string.
src/core/router/index.ts Updated router parameters for "search-page" to accept type and query.
src/components/panels/types/musicItemOptions.tsx Extended song item options for quick search navigation with onLongPress handlers.
Comments suppressed due to low confidence (2)

src/components/panels/types/musicItemOptions.tsx:62

  • The function 'hidePanel' is called but is not defined or imported. Ensure that it is declared or imported appropriately before use.
hidePanel();

src/pages/searchPage/components/resultPanel/index.tsx:30

  • [nitpick] The variable name 'scene' may be ambiguous since it holds a search type value. Consider renaming it to 'searchType' for clarity.
const [scene] = useAtom(typeAtom);

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.

1 participant