Skip to content
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(prop): fix that the prop model is not reused and the update is not triggered #2114

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

liujuping
Copy link
Collaborator

No description provided.

@liujuping liujuping requested a review from JackLian as a code owner May 31, 2023 10:19
@liujuping
Copy link
Collaborator Author

fixed #2098

with: alibaba/lowcode-engine-ext#63

@liujuping
Copy link
Collaborator Author

fixed,#2019

@github-actions
Copy link

感谢你的 PR,根据引擎的 研发协作流程,请将目标合入分支设置为 develop

Thanks in advance, according to the Contribution Guideline, please set the base branch to develop.

@liujuping

@github-actions
Copy link

github-actions bot commented May 31, 2023

ChatGPT Code Review:

修改建议:

  1. 在第 9 行,缺少描述信息,请将“详细内容:null”修改成有意义的描述信息。
  2. 在第 20 行和第 45 行,将 @obx.shallow 移到 _maps 属性上面。
  3. 在第 26 行和第 51 行,将 _maps 变量名称修改成 prevMaps,以更准确地描述其作用。
  4. 在第 85 行,将 this._prevMaps 修改成 this._maps。
  5. 在第 91 行和第 109 行,将 if (this._prevMaps?.has(...)) 修改成 if (this._maps?.has(...))。
  6. 在第 146 行和第 167 行,将 _maps 移到 _prevMaps 赋值上面。
  7. 在第 176 行,将“构造 items 属性,同时构造 maps 属性”修改成“构造 items 属性,同时清空 maps 属性”。
  8. 在第 400 行,将 if (this._prevMaps) 修改成 if (this._maps)。

代码功能描述:
此代码是针对一个 Prop 类进行修改的,主要包括以下几个方面:

  1. 增加了 "@alilc/build-plugin-lce" 的依赖。
  2. 修改了 _maps 属性的实现,将其作为一层缓存机制,以复用部分已存在的 Prop,保持响应式关系。
  3. 修改了清理 _items 属性时,对 _maps 属性的处理。
  4. 修改了部分变量名,以更准确地描述其作用。

@github-actions
Copy link

github-actions bot commented May 31, 2023

Coverage report for packages/react-simulator-renderer

St.
Category Percentage Covered / Total
🔴 Statements 33.63% 114/339
🔴 Branches 14.88% 25/168
🔴 Functions 26.14% 23/88
🔴 Lines 34.23% 114/333

Test suite run success

2 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 0fb84c6

@github-actions
Copy link

github-actions bot commented May 31, 2023

Coverage report for packages/utils

St.
Category Percentage Covered / Total
🔴 Statements 48.8% 122/250
🔴 Branches 43.49% 117/269
🔴 Functions 41.77% 33/79
🔴 Lines 49.79% 117/235

Test suite run success

33 tests passing in 6 suites.

Report generated by 🧪jest coverage report action from 0fb84c6

@github-actions
Copy link

github-actions bot commented May 31, 2023

Coverage report for packages/designer

St.
Category Percentage Covered / Total
🟢 Statements
96.37% (-0% 🔻)
2840/2947
🟢 Branches 89.05% 1626/1826
🟢 Functions 95.97% 858/894
🟢 Lines
96.44% (-0% 🔻)
2767/2869
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / prop.ts
99.32% (-0.01% 🔻)
92.19% 100%
99.31% (-0.01% 🔻)

Test suite run success

370 tests passing in 42 suites.

Report generated by 🧪jest coverage report action from 0fb84c6

@github-actions
Copy link

github-actions bot commented May 31, 2023

Coverage report for packages/renderer-core

St.
Category Percentage Covered / Total
🟡 Statements
71.95% (+0.02% 🔼)
908/1262
🟡 Branches
61.23% (+0.17% 🔼)
567/926
🟡 Functions 69.12% 197/285
🟡 Lines
71.94% (+0.02% 🔼)
892/1240

Test suite run success

91 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from 0fb84c6

@liujuping liujuping changed the base branch from main to develop May 31, 2023 10:36
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: -22.19 ⚠️

Comparison is base (0e90ea8) 84.64% compared to head (99be27c) 62.46%.

❗ Current head 99be27c differs from pull request most recent head 0fb84c6. Consider uploading reports for the commit 0fb84c6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #2114       +/-   ##
============================================
- Coverage    84.64%   62.46%   -22.19%     
============================================
  Files           64       26       -38     
  Lines         5523     1886     -3637     
  Branches      1319      483      -836     
============================================
- Hits          4675     1178     -3497     
+ Misses         786      646      -140     
  Partials        62       62               

see 39 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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