Skip to content

Conversation

Copy link

Copilot AI commented Nov 22, 2025

Absolutely positioned backgrounds were constrained by SafeAreaProvider boundaries, causing white borders at screen edges in dark mode (particularly bottom safe area on ColorOS 15).

Changes

  • Added useBackgroundInsets hook - Returns negative safe area insets to extend backgrounds beyond safe boundaries
  • Updated PageBackground component - Applied hook to cover home/drawer backgrounds
  • Updated MusicDetail background - Applied same pattern for consistency

Implementation

// New hook
export default function useBackgroundInsets() {
    const insets = useSafeAreaInsets();
    return {
        top: -insets.top,
        bottom: -insets.bottom,
        left: -insets.left,
        right: -insets.right,
    };
}

// Usage in background components
const backgroundInsets = useBackgroundInsets();
<View style={[style.background, backgroundInsets]} />

Interactive content remains properly inset via existing SafeAreaView components with edges configuration.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: /usr/local/bin/node node /usr/local/bin/npm install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>背景未完全覆盖</issue_title>
<issue_description>### 提问题之前,请先确认

  • 已经阅读过Q&A (https://musicfree.catcat.work/qa/mobile.html)
  • 要提出的问题与插件功能无关(类似某个插件搜索结果不全、ip被封禁等请找对应插件作者,在此仓库下提具体插件的问题将会被直接关闭)
  • 不与其他已有issue重复

系统信息

0.6.3-beta.0
coloros15

问题描述

背景底有未被覆盖的白边。打开菜单其背景显示正常,可以确定非手势条

复现步骤

主题选择深色模式

截图 & 日志

Image
Image</issue_description>

<agent_instructions>This issue is related to SafeArea. Please fix this issue. Make sure your change won't affect existing functions.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@maotoumao maotoumao changed the base branch from master to dev November 22, 2025 14:58
Copilot AI and others added 3 commits November 22, 2025 15:04
Modified PageBackground component to extend beyond safe area boundaries by using negative insets. This ensures the background color covers the entire screen including the safe area regions at top, bottom, left, and right edges.

Co-authored-by: maotoumao <[email protected]>
Applied the same fix to the music detail page background component to ensure it extends beyond safe area boundaries. This maintains consistency across the app.

Co-authored-by: maotoumao <[email protected]>
Created useBackgroundInsets hook to reduce code duplication and improve maintainability. This hook encapsulates the logic for calculating negative safe area insets used to extend backgrounds beyond safe area boundaries.

Co-authored-by: maotoumao <[email protected]>
Copilot AI changed the title [WIP] Fix background not fully covering in dark mode Fix background not covering safe area in dark mode Nov 22, 2025
Copilot AI requested a review from maotoumao November 22, 2025 15:11
@maotoumao maotoumao closed this Nov 25, 2025
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