From bac7357e9d40b134c660aecde69a2498c924a72a Mon Sep 17 00:00:00 2001 From: zealotchen Date: Mon, 21 Oct 2024 15:14:10 +0800 Subject: [PATCH 1/3] feat(web): fix webrender image not show --- .../scripts/hippy-webpack.web-renderer.dev.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js index eddabd07d96..793d00bb4ba 100644 --- a/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js +++ b/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web-renderer.dev.js @@ -35,7 +35,11 @@ module.exports = { template: path.resolve('./public/index.html'), }), new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify('development'), + 'process.env': { + NODE_ENV: JSON.stringify('development'), + HOST: JSON.stringify(process.env.DEV_HOST || '127.0.0.1'), + PORT: JSON.stringify(process.env.DEV_PORT || 3000), + }, __PLATFORM__: JSON.stringify(platform), }), new CaseSensitivePathsPlugin(), From b3a390ad78060226d04c5d02968259e6387abb9a Mon Sep 17 00:00:00 2001 From: zealotchen Date: Mon, 21 Oct 2024 17:39:47 +0800 Subject: [PATCH 2/3] feat(web): fix webrender scawX scawY animation --- .../examples/hippy-react-demo/src/modules/Animation/index.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx b/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx index 6f48554bea4..866eed69e7b 100644 --- a/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx +++ b/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx @@ -154,6 +154,7 @@ export default class AnimationExample extends React.Component { duration: 2000, delay: 0, mode: 'timing', + valueType: 'deg', timingFunction: 'linear', }), follow: false, // 配置子动画的执行是否跟随执行 @@ -165,6 +166,7 @@ export default class AnimationExample extends React.Component { duration: 2000, delay: 0, mode: 'timing', + valueType: 'deg', timingFunction: 'linear', }), follow: true, @@ -182,6 +184,7 @@ export default class AnimationExample extends React.Component { duration: 2000, delay: 0, mode: 'timing', + valueType: 'deg', timingFunction: 'linear', }), follow: false, // 配置子动画的执行是否跟随执行 @@ -193,6 +196,7 @@ export default class AnimationExample extends React.Component { duration: 2000, delay: 0, mode: 'timing', + valueType: 'deg', timingFunction: 'linear', }), follow: true, From 3c37afe2f274278110ae8b4ff2ecc5bc9981757d Mon Sep 17 00:00:00 2001 From: zealotchen Date: Mon, 21 Oct 2024 19:22:31 +0800 Subject: [PATCH 3/3] fix(web): fix webrender listview item relayout --- .../js/packages/hippy-web-renderer/src/component/list-view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/js/packages/hippy-web-renderer/src/component/list-view.ts b/driver/js/packages/hippy-web-renderer/src/component/list-view.ts index 68297a7716a..22b87413956 100644 --- a/driver/js/packages/hippy-web-renderer/src/component/list-view.ts +++ b/driver/js/packages/hippy-web-renderer/src/component/list-view.ts @@ -570,7 +570,8 @@ export class ListViewItem extends HippyWebView { public handleReLayout(entries: ResizeObserverEntry[]) { const [entry] = entries; const { height } = entry.contentRect; - if ((height === 0 && Math.round(height) !== this.height) || Math.round(height) !== this.dom?.clientHeight) { + if ((Math.round(height) === this.height) && Math.round(height) === this.dom?.clientHeight) { + // no need to relayout ListViewItem when height is not changed return; } this.height = Math.round(height);