tencent_cloud_chat_uikit_fl.../LOCAL_CHANGES.md

61 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 本地定制变更记录 (Local Custom Changes Log)
此文件用于记录**本项目相对于官方 Upstream 代码的所有定制化修改**。
每次修改源码或资源时,**必须**在此更新,以便后续维护人员清楚知道我们改了什么。
---
## 1. 资源定制 (Resource Customizations)
我们替换了官方的默认图标/图片,以符合项目 UI 风格。
| 路径 (Path) | 说明 (Description) | 保护策略 (Protection) |
| :--- | :--- | :--- |
| `images/` | 整个目录被替换为私有设计资源 | **High**: 在 `sync_from_upstream.sh` 中被硬编码保护,合并时永远使用 Our Version。 |
## 2. UI/逻辑修改 (UI/Logic Modifications)
我们修改了部分源码以调整布局或逻辑。
### `lib/ui/widgets/video_screen.dart`
* **修改日期**: 2026-01-05
* **修改目的**: 统一视频播放页的按钮样式,使其与图片浏览页一致。
* **详细改动**:
* `IconButton` 被包裹在 48x48 的 `SizedBox` 中。
* `iconSize` 调整为 30。
* `Positioned` 底部距离从 `20` 调整为 `50`
* `Positioned` 左右距离从 `20` 调整为 `10`
### `lib/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_more_panel.dart` 及相关 SVG
* **修改日期**: 2026-01-05
* **修改目的**: 完全使用官方 upstream 版本,避免本地定制导致的兼容性问题。
* **详细改动**:
* 从 upstream/main 同步了 `tim_uikit_more_panel.dart` 的完整官方代码。
* 从 upstream/main 同步了 `images/photo.svg`、`images/screen.svg`、`images/file.svg` 官方资源。
* 移除了之前的所有本地修改(包括使用 `images/svg/send_image.svg` 等的尝试)。
### `lib/ui/views/TIMUIKitChat/tim_uikit_multi_select_panel.dart`
* **修改日期**: 2026-01-06
* **修改目的**: 修复 Material 3 下多选面板图标按钮尺寸显示问题。
* **详细改动**:
* 为所有 `Image.asset` 添加明确的 `width``height` 参数。
* 桌面端desktopWidget图标设置为 30x30。
* 移动端defaultWidget图标设置为 40x40。
* 解决 `IconButton``iconSize` 参数对 `Image.asset` 不生效的 M3 兼容性问题。
### `scripts/sync_from_upstream.sh`
* **修改日期**: 2026-01-05
* **修改目的**: 修复同步脚本的关键 bug确保 `images/` 真正被保护。
* **详细改动**:
* 在合并前保存 master 的 commit hash (`MASTER_BEFORE_MERGE`)。
* 在恢复保护路径时使用保存的 commit而非 `HEAD``HEAD` 在合并后已被污染)。
---
## 3. 维护指南 (Maintenance Guide)
当您在 `upstream-main` (官方流) 之外修改了任何代码:
1. 请务必在此文件中新增记录。
2. 如果修改涉及**新文件**或**新目录**,请检查是否需要添加到 `scripts/sync_from_upstream.sh``PROTECTED_PATHS` 变量中。