Skip to content

mobile: 宽屏下搜索首页居中显示 - #383

Open
Francisewais wants to merge 1 commit into
bbplayer-app:devfrom
Francisewais:fix/search-home-center
Open

Francisewais wants to merge 1 commit into
bbplayer-app:devfrom
Francisewais:fix/search-home-center

Conversation

@Francisewais

@Francisewais Francisewais commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

问题

#374 给搜索首页的搜索框和内容区设了 maxWidth: MAX_WIDTH.search(720),但没有居中。同一个 PR 里,搜索结果页和播放页限制宽度时都同时写了 width: '100%' 和 alignSelf: 'center',搜索首页漏了这两项。所以在平板横屏时,标题、搜索框和最近搜索都挤在左边,右边空着一大半。

改动

标题、搜索框和内容区都用和搜索结果页一样的写法,在宽屏上作为一列居中。只改了 apps/mobile/src/app/(tabs)/index.tsx 里的样式。

手机屏幕比 720 窄,显示和原来一样。

测试

  • 在 iPad Pro 12.9(iPadOS 27.0)上看过:标题、搜索框和最近搜索居中成一列。测试包是 mobile: add initial iOS support #373 的 iOS 构建加上这个提交。
  • pnpm type-check、pnpm lint 通过。
  • 没有在 Android 平板上实测。按布局代码,Android 平板上这一列应该会在侧边导航栏右边的区域里居中。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 样式
    • 搜索页标题、搜索框和内容区域在宽屏下以居中列布局显示。

bbplayer-app#374 limited the search home's search bar and content to
MAX_WIDTH.search but did not center them, unlike the search results
and the player. On a tablet in landscape they sat on the left with the
right half of the screen empty.

The title, search bar and content now form one centered column. Phones
are narrower than the column, so they look the same as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@safedep

safedep Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

View complete scan results →

This report is generated by SafeDep GitHub App

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

搜索页的标题、搜索框和内容区域新增全宽及居中对齐样式。三个区域均设置 MAX_WIDTH.search 最大宽度,并保留原有布局属性。

Changes

搜索页布局

Layer / File(s) Summary
搜索页居中列样式
apps/mobile/src/app/(tabs)/index.tsx
标题、搜索框和内容区域新增全宽及居中对齐设置。三个区域保留原有内边距或弹性布局属性。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: roitium

Merge Risk: Minimal · up to 779ad

This is a style-only change that centers the search home column on wide screens. Phones narrower than 720 should look unchanged. The risk of merging is minimal; Android tablet layout is untested.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题“mobile: 宽屏下搜索首页居中显示”描述了本 PR 的主要变更:宽屏下搜索首页的标题、搜索框和内容居中显示。原始摘要显示改动集中在 apps/mobile/src/app/(tabs)/index.tsx 的样式,新增 width、maxWidth 和 alignSelf 属性,与标题一致。标题简短,指明了模块和效果。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

小兔望着搜索栏,
标题居中排成行。
内容铺开有宽度,
窄屏宽屏都清爽。
月光下轻轻点头,`

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5194c3f0-28bf-46bd-84dc-4b2c9f9d8788
Commits

Reviewing files that changed from the base of the PR and between fae6e80 and 779ad43.

Files selected for processing: 1

  • apps/mobile/src/app/(tabs)/index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

This branch has not been deployed

No deployments
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