-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: jdharmonycpp version and dd attribute are updated #2997
Conversation
Walkthrough该拉取请求对多个配置文件进行了调整。主要改动包括:
Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #2997 +/- ##
==========================================
Coverage 85.79% 85.79%
==========================================
Files 281 281
Lines 18527 18527
Branches 2810 2810
==========================================
Hits 15896 15896
Misses 2626 2626
Partials 5 5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/config.json (1)
173-174
: 格式调整:新增空白行此处在“布局组件”包数组前增加了一行空白,用于增强文件的可读性,建议整个文件的格式保持一致。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/nutui-taro-demo/config/index.js
(0 hunks)packages/nutui-taro-demo/package.json
(1 hunks)src/config.json
(17 hunks)
💤 Files with no reviewable changes (1)
- packages/nutui-taro-demo/config/index.js
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: test
🔇 Additional comments (17)
packages/nutui-taro-demo/package.json (1)
63-63
: 更新依赖版本:@jdtaro/plugin-platform-jdharmony-cpp 升级至 0.1.22该依赖版本已从 "0.1.4-alpha.3" 升级到 "0.1.22"。请确认新版本在项目中没有引入不兼容变化,并检查相关文档以了解新特性。
src/config.json (16)
226-237
: 重新排序“Col”组件在“布局组件”部分中,
Col
组件被重新添加并定位在此处,请确认其排序和显示逻辑符合预期,同时检查是否需要更新该组件的dd
属性(目前仍为 true)。
293-304
: 更新 BackTop 组件的文档显示属性
BackTop
组件的dd
属性已从原来的 true 修改为 false,这表示该组件将不会在文档中展示。请确认这符合设计需求。
305-316
: 更新 Elevator 组件的文档显示属性
Elevator
组件的dd
属性已修改为 false,确保该修改反映了组件在文档中不予展示的意图。
317-328
: 更新 FixedNav 组件的文档显示属性
FixedNav
组件的dd
属性已改为 false,如此设置符合隐藏该组件文档展示的需求,请确认无遗漏。
503-513
: 更新 Calendar 组件的文档显示属性在“数据录入”分组中,
Calendar
组件的dd
属性已从 true 修改为 false,建议核对该调整是否与后续文档管理策略一致。
695-705
: 更新 PickerView 组件的文档显示属性
PickerView
组件的dd
已更新为 false,表明该组件不再在组件文档中展示。请确认这种调整符合整体的组件展示策略。
733-744
: 更新 Range 组件的文档显示属性
Range
组件的dd
属性现设为 false,确保此变更与文档配置更新保持一致,建议审查所有数据录入组件的展示设置。
821-831
: 更新 Uploader 组件的文档显示属性
Uploader
组件的dd
已更新为 false,确保该组件在组件文档中隐藏符合业务需求。
915-927
: 更新 InfiniteLoading 组件的文档显示属性
InfiniteLoading
组件的dd
属性改为 false,这意味着自动加载组件在文档中不再显示。请确认这种隐藏行为符合预期。
965-977
: 更新 Notify 组件的文档显示属性
Notify
组件的dd
属性已从 true 调整为 false,请确认该修改是为了在文档中隐藏消息通知组件,并与其他反馈组件保持一致。
993-1004
: 更新 PullToRefresh 组件的文档显示属性
PullToRefresh
组件的dd
属性现设为 false,确保下拉刷新组件不显示在文档中,该调整符合整体的组件展示设置。
1005-1016
: 更新 Skeleton 组件的文档显示属性
Skeleton
组件的dd
属性已更新为 false,表明骨架屏组件不会在文档中展示,请确认这一改动符合设计要求。
1017-1028
: 更新 Swipe 组件的文档显示属性
Swipe
组件的dd
现已调整为 false,确保滑动手势组件不在文档中展示,该改动与其他组件的设置保持一致。
1204-1206
: 更新 Lottie 组件的文档显示属性在“展示组件”中,
Lottie
组件的dd
属性已修改为 false,确认该调整后组件将不在文档中展示。
1259-1268
: 请确认 Step 组件的文档显示设置
Step
组件的dd
属性依然为 true,虽然本次PR多数组件的dd
属性均已更新为 false。请确认是否希望该组件继续在文档中显示,如果需要隐藏,建议调整为 false。
1271-1281
: 请确认 Steps 组件的文档显示设置
Steps
组件的dd
属性当前为 true,与多数组件的更新方向不同。请检查该设置是否符合组件展示的整体规划。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/packages/cell/demos/taro/demo3.tsx (3)
11-22
: 标题部分样式调整建议建议将重复使用的样式属性抽取为公共样式对象,以提高代码复用性和可维护性。
建议应用以下修改:
+const commonViewStyle = { + display: 'flex', + alignItems: 'center', + flexDirection: 'row', + height: pxTransform(20), +} const Demo3 = () => { return ( <Cell title={ - <View - style={{ - display: 'flex', - alignItems: 'center', - flexDirection: 'row', - height: pxTransform(20), - }} - > + <View style={commonViewStyle}>
24-37
: 描述部分样式优化建议当前实现中,描述部分的样式与标题部分有重叠的属性。建议复用相同的样式属性,仅添加特定的样式差异。
建议按如下方式重构:
const Demo3 = () => { + const descriptionStyle = { + ...commonViewStyle, + fontSize: pxTransform(12), + color: '#505259', + } return ( <Cell description={ - <View - style={{ - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - fontSize: pxTransform(12), - color: '#505259', - height: pxTransform(20), - }} - > + <View style={descriptionStyle}>
34-36
: 文本样式建议建议将重复使用的文本样式提取为常量,以保持一致性。
建议应用以下修改:
+const textStyle = { + fontSize: pxTransform(12), +} +const highlightStyle = { + ...textStyle, + color: 'red', +} - <Text style={{ color: 'red', fontSize: pxTransform(12) }}>1</Text> + <Text style={highlightStyle}>1</Text>src/packages/navbar/demos/taro/demo3.tsx (1)
18-23
: 考虑将重复的 View 组件抽象为可复用组件当前的 View 组件实现在代码中重复出现。建议将其抽象为一个独立的组件以提高代码的可维护性。
建议如下重构:
+const EditButton = () => { + const marginStyle = harmony() ? { marginRight: 16 } : {} + return ( + <View + onClick={(e) => Taro.showToast({ title: '编辑' })} + style={marginStyle} + > + 编辑 + </View> + ) +} const Demo3 = () => { - const marginStyle = harmony() ? { marginRight: 16 } : {} // ... right={ <> - <View - onClick={(e) => Taro.showToast({ title: '编辑' })} - style={marginStyle} - > - 编辑 - </View> + <EditButton /> <More onClick={(e) => Taro.showToast({ title: 'icon' })} /> </> }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/packages/cell/demos/taro/demo3.tsx
(2 hunks)src/packages/navbar/demos/taro/demo3.tsx
(2 hunks)src/packages/resultpage/resultpage.scss
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: test
🔇 Additional comments (3)
src/packages/resultpage/resultpage.scss (1)
38-40
: 建议:检查和完善新增的按钮子元素样式新增加的
.nut-button-children
样式通过设置white-space: nowrap
防止按钮内文本换行,有助于保持布局的一致性。请确认该修改符合整体设计要求,并建议对常用浏览器进行兼容性测试,以确保在所有环境下表现正常。src/packages/navbar/demos/taro/demo3.tsx (2)
49-54
: 重复实现,请参考上述重构建议这里的实现与之前的 View 组件完全相同,进一步证实了需要将其抽象为可复用组件的必要性。
6-6
:❓ Verification inconclusive
平台特定样式的实现看起来不错!
代码逻辑清晰,通过
harmony()
函数优雅地处理了平台特定的样式需求。建议验证
harmony()
函数在不同平台上的行为是否符合预期。可以运行以下脚本检查实现:Also applies to: 11-11
🏁 Script executed:
#!/bin/bash # 描述:检查 harmony 函数的实现 ast-grep --pattern 'export function harmony() { $$$ }'Length of output: 58
平台特定样式验证建议
代码中通过
harmony()
实现的样式调整逻辑总体看起来没有问题,但当前自动检查未能捕捉到harmony()
函数的具体实现,可能是因为该函数的定义方式采用了箭头函数或其他形式。请务必手动核查以下内容:
确认
harmony()
的定义方式
检查@/utils/platform-taro
中harmony()
函数的具体实现,确保它确实按预期提供平台相关的逻辑判断。进一步验证建议
建议运行如下命令,以搜索项目中所有可能的harmony()
定义,帮助验证其实现形式:# 搜索项目中所有关于 harmony 定义的代码(支持 function 与箭头函数写法) rg -n -e 'export\s+(const|function)\s+harmony'请根据检查结果确认
harmony()
函数是否满足不同平台的样式需求,并确保代码稳定可靠。
* fix: jdharmonycpp version and dd attribute are updated * fix: modify component adaptation problems * fix: steps 未适配
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
☑️ 请求合并前的自查清单
Summary by CodeRabbit