@@ -54,7 +54,8 @@ import {
5454import { isAggregationApp } from "util/appUtils" ;
5555import EditorSkeletonView from "./editorSkeletonView" ;
5656import { getCommonSettings } from "@lowcoder-ee/redux/selectors/commonSettingSelectors" ;
57- import { isEqual } from "lodash" ;
57+ import { isEqual , noop } from "lodash" ;
58+ import { BottomSkeleton } from "./bottom/BottomContent" ;
5859
5960const LeftContent = lazy (
6061( ) => import ( './LeftContent' )
@@ -374,6 +375,23 @@ function EditorView(props: EditorViewProps) {
374375
375376const hideBodyHeader = useTemplateViewMode ( ) || ( isViewMode && ( ! showHeaderInPublic || ! commonSettings . showHeaderInPublicApps ) ) ;
376377
378+ const uiCompView = useMemo ( ( ) => {
379+ if ( showAppSnapshot ) {
380+ return (
381+ < ViewBody $hideBodyHeader = { hideBodyHeader } $height = { height } >
382+ < EditorContainer > { uiComp . getView ( ) } </ EditorContainer >
383+ </ ViewBody >
384+ ) ;
385+ }
386+
387+ return uiComp . getView ( ) ;
388+ } , [
389+ showAppSnapshot ,
390+ hideBodyHeader ,
391+ height ,
392+ uiComp ,
393+ ] ) ;
394+
377395// we check if we are on the public cloud
378396const isLowCoderDomain = window . location . hostname === 'app.lowcoder.cloud' ;
379397const isLocalhost = window . location . hostname === 'localhost' ;
@@ -425,16 +443,6 @@ function EditorView(props: EditorViewProps) {
425443
426444// history mode, display with the right panel, a little trick
427445const showRight = panelStatus . right || showAppSnapshot ;
428- let uiCompView ;
429- if ( showAppSnapshot ) {
430- uiCompView = (
431- < ViewBody $hideBodyHeader = { hideBodyHeader } $height = { height } >
432- < EditorContainer > { uiComp . getView ( ) } </ EditorContainer >
433- </ ViewBody >
434- ) ;
435- } else {
436- uiCompView = uiComp . getView ( ) ;
437- }
438446
439447const clickMenu = ( params :{ key :string } ) => {
440448let left = true ;
@@ -514,46 +522,47 @@ function EditorView(props: EditorViewProps) {
514522) }
515523</ Sider >
516524</ SiderWrapper >
517-
518- { panelStatus . left && editorModeStatus !== "layout" && (
519- < LeftPanel >
520- { menuKey === SiderKey . State && < LeftContent uiComp = { uiComp } /> }
521- { menuKey === SiderKey . Setting && (
522- < SettingsDiv >
523- < ScrollBar >
524- { application &&
525- ! isAggregationApp (
526- AppUILayoutType [ application . applicationType ]
527- ) && (
528- < >
529- { appSettingsComp . getPropertyView ( ) }
530- < Divider />
531- </ >
532- ) }
533- < TitleDiv > { trans ( "leftPanel.toolbarTitle" ) } </ TitleDiv >
534- { props . preloadComp . getPropertyView ( ) }
535- < PreloadDiv
536- onClick = { ( ) => dispatch (
537- setEditorExternalStateAction ( {
538- showScriptsAndStyleModal :true ,
539- } )
540- ) }
541- >
542- < LeftPreloadIcon />
543- { trans ( "leftPanel.toolbarPreload" ) }
544- </ PreloadDiv >
545- </ ScrollBar >
546-
547- { props . preloadComp . getJSLibraryPropertyView ( ) }
548- </ SettingsDiv >
549- ) }
550-
551- { menuKey === SiderKey . Layout && (
552- < LeftLayersContent uiComp = { uiComp } />
553- ) }
554-
555- </ LeftPanel >
556- ) }
525+ < Suspense fallback = { null } >
526+ { panelStatus . left && editorModeStatus !== "layout" && (
527+ < LeftPanel >
528+ { menuKey === SiderKey . State && < LeftContent uiComp = { uiComp } /> }
529+ { menuKey === SiderKey . Setting && (
530+ < SettingsDiv >
531+ < ScrollBar >
532+ { application &&
533+ ! isAggregationApp (
534+ AppUILayoutType [ application . applicationType ]
535+ ) && (
536+ < >
537+ { appSettingsComp . getPropertyView ( ) }
538+ < Divider />
539+ </ >
540+ ) }
541+ < TitleDiv > { trans ( "leftPanel.toolbarTitle" ) } </ TitleDiv >
542+ { props . preloadComp . getPropertyView ( ) }
543+ < PreloadDiv
544+ onClick = { ( ) => dispatch (
545+ setEditorExternalStateAction ( {
546+ showScriptsAndStyleModal :true ,
547+ } )
548+ ) }
549+ >
550+ < LeftPreloadIcon />
551+ { trans ( "leftPanel.toolbarPreload" ) }
552+ </ PreloadDiv >
553+ </ ScrollBar >
554+
555+ { props . preloadComp . getJSLibraryPropertyView ( ) }
556+ </ SettingsDiv >
557+ ) }
558+
559+ { menuKey === SiderKey . Layout && (
560+ < LeftLayersContent uiComp = { uiComp } />
561+ ) }
562+
563+ </ LeftPanel >
564+ ) }
565+ </ Suspense >
557566< MiddlePanel >
558567< EditorWrapper className = { editorContentClassName } >
559568< EditorHotKeys disabled = { readOnly } >
@@ -563,15 +572,19 @@ function EditorView(props: EditorViewProps) {
563572</ EditorContainerWithViewMode >
564573</ EditorHotKeys >
565574</ EditorWrapper >
566- { panelStatus . bottom && editorModeStatus !== "layout" && < Bottom /> }
575+ < Suspense fallback = { < BottomSkeleton /> } >
576+ { panelStatus . bottom && editorModeStatus !== "layout" && < Bottom /> }
577+ </ Suspense >
567578</ MiddlePanel >
568- { showRight && (
569- < RightPanel
570- uiComp = { uiComp }
571- onCompDrag = { onCompDrag }
572- showPropertyPane = { editorState . showPropertyPane }
573- onTabChange = { setShowPropertyPane } />
574- ) }
579+ < Suspense fallback = { null } >
580+ { showRight && (
581+ < RightPanel
582+ uiComp = { uiComp }
583+ onCompDrag = { onCompDrag }
584+ showPropertyPane = { editorState . showPropertyPane }
585+ onTabChange = { setShowPropertyPane } />
586+ ) }
587+ </ Suspense >
575588</ Body >
576589</ EditorGlobalHotKeys >
577590</ Height100Div > </ >