feat(react): support ET updateCardData bridge#2679
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughExtracts ChangesupdateCardData Core Implementation and Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
030f651 to
31b8dbd
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
31b8dbd to
0c7952a
Compare
0c7952a to
7856cbe
Compare
Web Explorer#10081 Bundle Size — 903.53KiB (0%).7856cbe(current) vs e794bbf main#10074(baseline) Bundle metrics
Bundle size by type
|
| Current #10081 |
Baseline #10074 |
|
|---|---|---|
499.15KiB |
499.15KiB |
|
402.16KiB |
402.16KiB |
|
2.22KiB |
2.22KiB |
Bundle analysis report Branch Yradex:wt/et-update-card-data Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#1640 Bundle Size — 208.75KiB (~+0.01%).7856cbe(current) vs e794bbf main#1633(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Yradex:wt/et-update-card-data Project dashboard Generated by RelativeCI Documentation Report issue |
React Example with Element Template#776 Bundle Size — 202.16KiB (+0.49%).7856cbe(current) vs e794bbf main#769(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Yradex:wt/et-update-card-data Project dashboard Generated by RelativeCI Documentation Report issue |
React Example#8507 Bundle Size — 237.81KiB (~+0.01%).7856cbe(current) vs e794bbf main#8500(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Yradex:wt/et-update-card-data Project dashboard Generated by RelativeCI Documentation Report issue |
React External#1622 Bundle Size — 698.01KiB (~+0.01%).7856cbe(current) vs e794bbf main#1615(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Yradex:wt/et-update-card-data Project dashboard Generated by RelativeCI Documentation Report issue |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary by CodeRabbit
Release Notes
New Features
Tests
Overview
Native background
updateDatacan now drive Element Template init data with the same observable behavior as Snapshot. The bridge is installed aslynxCoreInject.tt.updateCardData, reuses a shared Snapshot-compatibleupdateCardDataimplementation, and preserves ET's native command boundary by flushingtriggerDataUpdatedwithout inventing fake native mutations.Key Points
updateCardDatasemantics intocore/lynx-update-data.tsso Snapshot and ET use the same implementation for timing flag stripping, RESET handling, init data merging, andonDataChangeddispatch.__FlushElementTree(__page, { triggerDataUpdated: true })for data-only updates.updateCardData.Runtime Contract
lynxCoreInject.tt.updateCardData(newData, options)now has one shared runtime contract:__lynx_timing_flagfrom the patch and reports the Snapshot-compatible warning;lynx.__initDatafirst whenoptions.type == NativeUpdateDataType.RESET;lynx.__initData = Object.assign({}, lynx.__initData, restNewData);onDataChangedwith[restNewData], not the full merged init data.This PR only closes the background
updateCardDatabridge. Main-threadupdatePage, reload, and GlobalProps parity remain out of scope.Checklist