Open
pre-release:@react-native-ohos/bottom-sheet@5.2.1 #28
pre-release:@react-native-ohos/bottom-sheet@5.2.1 #28
Open
zhoukc42Add on 22 hours ago
zhoukc42
zhoukc42
22 hours ago

pre-release:@react-native-ohos/bottom-sheet@5.2.1

likedislike
Merge blocked
cpf-managercpf-managerCollaborators
22 hours ago Added label: AI检视中
zhoukc42zhoukc42
22 hours ago Associated issue: pre-release:@react-native-ohos/bottom-sheet@5.2.1
zhoukc42
zhoukc42
22 hours ago Comments:

start build

likedislike
openharmony_ci
openharmony_ciCollaborators
22 hours ago Comments:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ciCollaborators
22 hours ago Added label: dco检查成功
openharmony_ci
openharmony_ciCollaborators
22 hours ago Comments:

首次触发
门禁构建开始,包含静态检查、代码编译和测试【rntpc_component测试, rntpc_component编译, rntpc_component-jest编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6aeda78864650f998ba904ad/runlist

likedislike
cpf-manager
cpf-managerCollaborators22 hours agoStart code review2
CHANGELOG.md
Outdated
@@ -3,0 +3,4 @@
3+## 鸿蒙化Log
4+ 
5+### v5.2.1
6+- fix: 修复bottom-sheet抽屉内存在列表时手势分配逻辑问题。([#27](https://gitcode.com/CPF-RN/react-native-bottom-sheet/pull/27))
cpf-manager
cpf-manager22 hours agoComments:

【AI-Review】【一般】【编码规范】【其他编码规范】
● 问题: 本次新增的 CHANGELOG 发布说明为中文,不符合发布说明全英文规范。新增内容(CHANGELOG.md:5-6):

### v5.2.1
- fix: 修复bottom-sheet抽屉内存在列表时手势分配逻辑问题。([#27](https://gitcode.com/CPF-RN/react-native-bottom-sheet/pull/27))

其中"修复bottom-sheet抽屉内存在列表时手势分配逻辑问题"为非英文内容。对照同文件 ## ReleaseLog 区段既有条目(如 CHANGELOG.md:20 起的 Release 5.1.6)均采用英文描述,本次新增的发布说明与之不一致。

● 影响: 面向开源社区(含海外贡献者)的发布说明存在语言门槛,且与既有 ReleaseLog 英文规范不一致,影响后续维护与国际化阅读。

● 建议: 将本次新增的 v5.2.1 条目改为英文,例如:

### v5.2.1
- fix: resolve gesture distribution logic for lists inside bottom-sheet. ([#27](https://gitcode.com/CPF-RN/react-native-bottom-sheet/pull/27))
likedislike
System
System MessageSystem
21 hours ago Comments:

changed this line on 3ec690ce view diff detail

cpf-manager
cpf-managerCollaborators22 hours agoStart code review2
example/src/examples/BottomSheetTouchSourceTrackingDemo.tsx
@@ -0,0 +140,4 @@
140+ * 获取 harmonyTouchStateRef,轮询 source 变化并上报日志。
141+ */
142+function TouchSourceLogger({ onLog }: { onLog: (label: string) => void }) {
143+ const internal = useBottomSheetInternal(true) as any;
cpf-manager
cpf-manager22 hours agoComments:

【AI-Review】【一般】【编码规范】【其他编码规范】
● 问题: TouchSourceLogger 中通过 as any 丢弃类型信息,绕过了 useBottomSheetInternal 已提供的类型定义。BottomSheetTouchSourceTrackingDemo.tsx:143:

const internal = useBottomSheetInternal(true) as any;

useBottomSheetInternal(true)(src/hooks/useBottomSheetInternal.ts:11-13)已声明返回 BottomSheetInternalContextType | null,其中 harmonyTouchStateRef 字段在 src/contexts/internal.ts:71-74 有完整类型定义。as any 使后续 internal.harmonyTouchStateRef.current(BottomSheetTouchSourceTrackingDemo.tsx:150)失去编译期校验,任何字段拼写错误或结构变更都不会被 TS 捕获。对照同目录既有示例(example/src/examples/ 下 BottomSheetFailOffsetDemo.tsx、BottomSheetActiveOffsetDemo.tsx 等)均未出现 as any,本次新增文件引入了不一致的写法。

● 影响: 示例代码作为开发者参考样板,as any 会弱化类型安全的示范作用;后续若 BottomSheetInternalContextType 结构变更(如字段重命名),此处不会产生编译报错,缺陷将延迟到运行时才暴露。

● 建议: 移除 as any,将空值守卫改为显式判空即可让 TS 正确收窄类型:

function TouchSourceLogger({ onLog }: { onLog: (label: string) => void }) {
  const internal = useBottomSheetInternal(true);
  const prevSourceRef = useRef<string>('');

  useEffect(() => {
    if (!internal || !internal.harmonyTouchStateRef) return;
    const interval = setInterval(() => {
      const current = internal.harmonyTouchStateRef.current;
      // ...
    }, 200);
    return () => clearInterval(interval);
  }, [internal, onLog]);
  return null;
}
likedislike
zhoukc42
zhoukc42
21 hours ago Comments:

harmonyTouchStateRef 是ohos适配包的字段,在example配置中未指定指向鸿蒙包,所以使用any泛化类型即可。

cpf-managercpf-managerCollaborators
22 hours ago Removed label: AI检视中
cpf-managercpf-managerCollaborators
22 hours ago Added label: AI已检视
openharmony_ciopenharmony_ciCollaborators
22 hours ago Added label: 静态检查失败
openharmony_ci
openharmony_ciCollaborators
22 hours ago Comments:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6aeda78864650f998ba904ad/runlist

静态检查:

# check type result report
1 codeCheck noPass >>>

编译测试:
# Device build result package
1 rntpc_component pending NA
2 rntpc_component-jest pending NA

likedislike
zhoukc42zhoukc42
21 hours ago Pushed 3 commits:d71968db-pre-release:@react-native-ohos/bottom-sheet@5.2.1,0be356a2-test: 优化代码格式问题。,278aa13b-Merge branch 'master' of https://gitcode.com/zhoukc42/react-native-bottom-sheet_5183
cpf-managercpf-managerCollaborators
21 hours ago Removed label: AI已检视
cpf-managercpf-managerCollaborators
21 hours ago Added label: AI检视中
openharmony_ciopenharmony_ciCollaborators
21 hours ago Removed label: 静态检查失败
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
zhoukc42
zhoukc42
21 hours ago Comments:

start build

likedislike
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【rntpc_component-jest编译, rntpc_component测试, rntpc_component编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6aedb75364650f998baef646/runlist

likedislike
cpf-managercpf-managerCollaborators
21 hours ago Removed label: AI检视中
cpf-managercpf-managerCollaborators
21 hours ago Added label: AI已检视
openharmony_ciopenharmony_ciCollaborators
21 hours ago Added label: 静态检查失败
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6aedb75364650f998baef646/runlist

静态检查:

# check type result report
1 codeCheck noPass >>>

编译测试:
# Device build result package
1 rntpc_component pending NA
2 rntpc_component-jest pending NA

likedislike
zhoukc42zhoukc42
21 hours ago Pushed 1 commits:3ec690ce-docs: 更新changelog修改记录为英文。
cpf-managercpf-managerCollaborators
21 hours ago Removed label: AI已检视
cpf-managercpf-managerCollaborators
21 hours ago Added label: AI检视中
openharmony_ciopenharmony_ciCollaborators
21 hours ago Removed label: 静态检查失败
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ciCollaborators
21 hours ago Comments:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
zhoukc42
zhoukc42
21 hours ago Comments:

start build

likedislike
openharmony_ci
openharmony_ciCollaborators
20 hours ago Comments:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【rntpc_component-jest编译, rntpc_component编译, rntpc_component测试】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6aedb9a264650f998bafbe37/runlist

likedislike
cpf-managercpf-managerCollaborators
20 hours ago Removed label: AI检视中
cpf-managercpf-managerCollaborators
20 hours ago Added label: AI已检视
openharmony_ciopenharmony_ciCollaborators
20 hours ago Added label: 静态检查失败
openharmony_ci
openharmony_ciCollaborators
20 hours ago Comments:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6aedb9a264650f998bafbe37/runlist

静态检查:

# check type result report
1 codeCheck noPass >>>

编译测试:
# Device build result package
1 rntpc_component pending NA
2 rntpc_component-jest pending NA

likedislike