From 7693f1ea9dce67f4162ecd8312ec7166f18a7167 Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Mon, 13 Oct 2025 16:16:45 +0530 Subject: [PATCH] Refactor components and improve loading behavior - Simplified rendering of CompareLayOut and ComparisonScene components. - Enhanced MainScene to log createNewWindow state and conditionally render LoadingPage. - Updated GlobalProperties to improve environment settings handling. - Refactored LoadingPage to support rendering as a portal and added new props for flexibility. - Improved NewWindowScene to include LoadingPage and handle loading progress. - Added console logs for debugging in calculateSimulationData and ComparisonResult components. - Cleaned up unused code and improved readability across various components. - Adjusted styles in loading.scss for better visual consistency and responsiveness. --- .../layout/scenes/ComparisonScene.tsx | 2 +- .../components/layout/scenes/MainScene.tsx | 65 ++++-- .../functions/calculateSimulationData.ts | 1 + .../properties/GlobalProperties.tsx | 112 +++++++++-- .../components/templates/CreateNewWindow.tsx | 165 ++-------------- app/src/components/templates/LoadingPage.tsx | 70 ++++--- .../components/ui/compareVersion/Button.tsx | 19 +- .../ui/compareVersion/CompareLayOut.tsx | 8 +- .../ui/compareVersion/ComparisonResult.tsx | 161 +++++++++++---- .../ui/compareVersion/NewWindowScene.tsx | 15 +- app/src/modules/builder/builder.tsx | 16 +- app/src/styles/layout/_loading.scss | 186 +++++++++--------- 12 files changed, 477 insertions(+), 343 deletions(-) diff --git a/app/src/components/layout/scenes/ComparisonScene.tsx b/app/src/components/layout/scenes/ComparisonScene.tsx index 4cbb543..ac0c4db 100644 --- a/app/src/components/layout/scenes/ComparisonScene.tsx +++ b/app/src/components/layout/scenes/ComparisonScene.tsx @@ -220,7 +220,7 @@ function ComparisonScene() {