文件最后提交记录最后更新时间
fix: use native ViewConfigs for core components Co-authored-by: Arkadiusz Kasprzyk<arkadiusz.kasprzyk@swmansion.com> # message auto-generated for no-merge-commit merge: merge kas/fix-native-view-configs into 0.77.1-rc.1-ohos fix: use native ViewConfigs for core components + update RNC submodule Created-by: arkadiuszkasprzyk Commit-by: Arkadiusz Kasprzyk Merged-by: huangyouhua Description: ## Why is this change needed After updating to 0.77 and enabling bridgless, native view configs aren't used anymore in RNOH. Instead, RN uses ViewConfigs defined on JS side for iOS. Currently, props not supported on iOS don't work on RNOH. RNOH maintainers attempted to fix this problem by patching JS view configs. This MR aims to eliminate the root problem — enabling back native view configs for core components (they are defined in ComponentJSIBinders). ## Changes - fixed not working native view configs ## Test Plan ### 1 Check e.g. RefreshControl::disable/enable pull to refresh test case ### 2 1. Checkout RNC submodule to the branch used by this MR: https://gl.swmansion.com/rnoh/react-native-core/-/merge_requests/37 2. Add log to "getConstantsForViewManager" and notice that after applying this change that log is called for core components. ``` void RNInstanceCAPI::installJSBindings(facebook::jsi::Runtime& rt) { // install console.log (etc.) implementation react::bindNativeLogger(rt, nativeLogger); // install tracing functions rnoh::setupTracing(rt); facebook::react::bindHasComponentProvider( rt, [this](std::string const& name) { return m_componentJSIBinderByName.contains(name); }); facebook::react::LegacyUIManagerConstantsProviderBinding::install( rt, "getConstantsForViewManager", [this](auto& rt, auto const& name) -> jsi::Value { DLOG(INFO) << "@@@getConstantsForViewManager: " << name; auto componentJSIBinder = m_componentJSIBinderByName.find(name); ``` ## Checklist - [x] Does not involve incompatible changes; if involved, has been reviewed accordingly. - [ ] Does not impact performance, or performance testing has been conducted without degradation. - [ ] Complies with the relevant coding standards. - [x] Does not involve documentation updates, or the documentation has been updated. - [ ] Meets testability requirements with necessary self-test cases, appropriate logging, or trace information added. - [x] No illegal file inclusions exist, such as images or code. See merge request: openharmony-sig/ohos_react_native!9811 年前