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

chore(core): improve display model #1713

Merged
merged 2 commits into from
Jul 3, 2021
Merged

Conversation

janryWang
Copy link
Collaborator

@janryWang janryWang commented Jul 3, 2021

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

#1712 并没有根本上解决问题,如果是嵌套中的嵌套,还是会出问题

仔细想了一下,其实display应该是在父节点为visible状态的时候,selfDisplay优先级要高于父节点,如果父节点为hidden/none,那么子节点应该强制设置为其对应的值才行,这么看来显隐模型真的是表单模型中的重要概念了

@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #1713 (9d4bad8) into formily_next (5ca344e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           formily_next    #1713   +/-   ##
=============================================
  Coverage         91.76%   91.77%           
=============================================
  Files               135      135           
  Lines              5987     5993    +6     
  Branches           1492     1494    +2     
=============================================
+ Hits               5494     5500    +6     
  Misses              489      489           
  Partials              4        4           
Impacted Files Coverage Δ
packages/core/src/shared/internals.ts 95.35% <ø> (-0.03%) ⬇️
packages/core/src/models/Field.ts 99.21% <100.00%> (+<0.01%) ⬆️
packages/core/src/models/VoidField.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ca344e...9d4bad8. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2021

Size Change: +21 B (0%)

Total Size: 575 kB

Filename Size Change
packages/core/dist/formily.core.umd.development.js 17.9 kB +26 B (0%)
packages/core/dist/formily.core.umd.production.js 12 kB -5 B (0%)
ℹ️ View Unchanged
Filename Size
designable/antd/dist/formily.designable.antd.umd.development.js 133 kB
designable/antd/dist/formily.designable.antd.umd.production.js 103 kB
designable/next/dist/formily.designable.next.umd.development.js 332 B
designable/next/dist/formily.designable.next.umd.production.js 252 B
designable/setters/dist/formily.designable.antd.umd.development.js 331 B
designable/setters/dist/formily.designable.antd.umd.production.js 251 B
packages/antd/dist/formily.antd.umd.development.js 59.3 kB
packages/antd/dist/formily.antd.umd.production.js 34.1 kB
packages/json-schema/dist/formily.json-schema.umd.development.js 6.86 kB
packages/json-schema/dist/formily.json-schema.umd.production.js 4.87 kB
packages/next/dist/formily.next.umd.development.js 60.4 kB
packages/next/dist/formily.next.umd.production.js 35.4 kB
packages/path/dist/formily.path.umd.development.js 12 kB
packages/path/dist/formily.path.umd.production.js 8.38 kB
packages/react/dist/formily.react.umd.development.js 11.2 kB
packages/react/dist/formily.react.umd.production.js 6.97 kB
packages/reactive-react/dist/formily.reactive-react.umd.development.js 3.38 kB
packages/reactive-react/dist/formily.reactive-react.umd.production.js 2.23 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.development.js 2.37 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.production.js 1.76 kB
packages/reactive/dist/formily.reactive.umd.development.js 7.63 kB
packages/reactive/dist/formily.reactive.umd.production.js 4.54 kB
packages/shared/dist/formily.shared.umd.development.js 6.35 kB
packages/shared/dist/formily.shared.umd.production.js 4.1 kB
packages/validator/dist/formily.validator.umd.development.js 7.01 kB
packages/validator/dist/formily.validator.umd.production.js 5.61 kB
packages/vue/dist/formily.vue.umd.development.js 14.3 kB
packages/vue/dist/formily.vue.umd.production.js 9.18 kB

compressed-size-action

@janryWang janryWang merged commit bad483d into formily_next Jul 3, 2021
@janryWang janryWang deleted the improve_display_model branch July 3, 2021 12:53
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.

1 participant