Skip to content

fix: 移除jmfe桥接方式 - #3479

Merged
xiaoyatong merged 1 commit into
jdf2e:feat_v4.xfrom
irisSong:feat_4.x
Jun 8, 2026
Merged

fix: 移除jmfe桥接方式#3479
xiaoyatong merged 1 commit into
jdf2e:feat_v4.xfrom
irisSong:feat_4.x

Conversation

@irisSong

@irisSong irisSong commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

发行说明

  • 优化改进
    • 简化了缩放计算方式,改为纯视口计算方案
    • 优化了缩放刷新性能,改为同步处理
    • 移除了原生桥接依赖,提升系统稳定性

@github-actions github-actions Bot added the action:review This PR needs more reviews (less than 2 approvals) label Jun 8, 2026
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

移除原生桥接类型定义与 window.jmfe.callNative 声明,将缩放获取逻辑从异步原生优先改为纯同步视口计算;refreshScaleFasync/await 形式改为直接同步调用 getScaleF()

Changes

缩放计算同步化与原生桥接移除

Layer / File(s) Summary
原生桥接类型移除
src/utils/scale-f.ts
移除文件顶部 window.jmfe.callNative 相关的类型定义(NativeScaleResponseNativeCaller)及全局声明,不再依赖原生桥接。
缩放函数同步化与注释更新
src/utils/scale-f.ts
更新 getScaleByViewport 注释为通用描述;getScaleF 改为同步纯视口计算,移除 getScaleByNative 的异步原生优先逻辑;refreshScaleF 从异步改为同步,直接调用 getScaleF() 获取缩放值。

🎯 2 (Simple) | ⏱️ ~10 分钟

Suggested reviewers

  • xiaoyatong

Poem

🐰 原生桥接已拆除,
同步视口掌全局;
缩放清晰无等待,
简洁高效新姿态。✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR描述仅包含空白的模板内容,所有必需部分均未填写,包括变动性质、相关Issue、需求背景和解决方案等关键信息。 请补充完整的PR描述:勾选变动性质(重构),说明移除jmfe桥接的原因和背景,并完成自查清单的所有项目。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR标题简明扼要地说明了主要变更:移除jmfe桥接方式,与代码摘要中描述的核心改动(移除window.jmfe.callNative桥接实现)相匹配。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@xiaoyatong
xiaoyatong merged commit 8666c6a into jdf2e:feat_v4.x Jun 8, 2026
5 checks passed
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.42%. Comparing base (a938cf8) to head (3329762).
⚠️ Report is 3 commits behind head on feat_v4.x.

Files with missing lines Patch % Lines
src/utils/scale-f.ts 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff              @@
##           feat_v4.x    #3479      +/-   ##
=============================================
+ Coverage      88.33%   88.42%   +0.09%     
=============================================
  Files            295      295              
  Lines          19747    19726      -21     
  Branches        3117     3117              
=============================================
  Hits           17443    17443              
+ Misses          2298     2277      -21     
  Partials           6        6              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot mentioned this pull request Jun 12, 2026
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action:review This PR needs more reviews (less than 2 approvals) size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants