From 2018c64691d3936e5732d090f351323b977c0ca5 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 14:35:26 +0100 Subject: [PATCH 01/11] feat:Add Storybook deployment workflow --- .github/workflows/static.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 000000000..1c71018f0 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,49 @@ +name: Deploy Storybook (feature/aip) + +on: + push: + branches: + - feature/aip + workflow_dispatch: + +permissions: + contents: write + pages: write + id-token: write + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + + - name: Install dependencies + run: yarn install --immutable + + - name: Build Storybook + run: yarn build-storybook --output-dir storybook-static + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: storybook-static + + deploy: + needs: build-deploy + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From 91a646dd8f3dd33ccdf4dd47a38a919e2fd11bd9 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 14:40:53 +0100 Subject: [PATCH 02/11] feat: disable Jekyll --- .github/workflows/static.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 1c71018f0..fdcde8159 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -31,6 +31,9 @@ jobs: - name: Build Storybook run: yarn build-storybook --output-dir storybook-static + - name: Disable Jekyll + run: echo "" > storybook-static/.nojekyll + - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: From 3c811cdd5f6c5fa8e95cba9fc82515a98004a06f Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 14:47:51 +0100 Subject: [PATCH 03/11] feat: fix build errors --- .github/workflows/static.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index fdcde8159..c0b0c8007 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,20 +1,18 @@ -name: Deploy Storybook (feature/aip) +name: Deploy Storybook on: push: branches: - feature/aip - workflow_dispatch: permissions: - contents: write + contents: read pages: write id-token: write jobs: - build-deploy: + build: runs-on: ubuntu-latest - steps: - name: Checkout uses: actions/checkout@v4 @@ -22,8 +20,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 - cache: yarn + node-version: 22 # same as project - name: Install dependencies run: yarn install --immutable @@ -40,13 +37,12 @@ jobs: path: storybook-static deploy: - needs: build-deploy runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + needs: build + permissions: + pages: write + id-token: write steps: - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v3 From 79f202c60c00aaed4759679fe8d7a6c4bde0f249 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 14:51:18 +0100 Subject: [PATCH 04/11] feat: fix build errors --- .github/workflows/static.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index c0b0c8007..3c35d2c77 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,26 +1,30 @@ -name: Deploy Storybook +name: Deploy Storybook to GitHub Pages on: push: - branches: - - feature/aip + branches: ["feature/aip"] + workflow_dispatch: permissions: contents: read pages: write id-token: write +concurrency: + group: "storybook-pages" + cancel-in-progress: false + jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repo uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 # same as project + node-version: 22 - name: Install dependencies run: yarn install --immutable @@ -32,17 +36,17 @@ jobs: run: echo "" > storybook-static/.nojekyll - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: storybook-static deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build - permissions: - pages: write - id-token: write - steps: - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v3 + id: deployment + uses: actions/deploy-pages@v4 From 4b579376edf06c2a0f815ef731edd3b7b699946c Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 14:59:24 +0100 Subject: [PATCH 05/11] feat: fix build errors --- .github/workflows/static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3c35d2c77..4e045ea8b 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -2,7 +2,7 @@ name: Deploy Storybook to GitHub Pages on: push: - branches: ["feature/aip"] + branches: ["feature/storybook-ci", "feature/aip" ] workflow_dispatch: permissions: From 87775e42a66dd44f51f3262764d45dd8a7d99564 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Fri, 28 Nov 2025 15:02:48 +0100 Subject: [PATCH 06/11] feat: fix build errors --- .github/workflows/static.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4e045ea8b..e970bd7f9 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -10,43 +10,39 @@ permissions: pages: write id-token: write -concurrency: - group: "storybook-pages" - cancel-in-progress: false - jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout repo + - name: Checkout uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 22 + - name: Enable Corepack + run: corepack enable + + - name: Set Yarn version to 4.9.4 + run: corepack prepare yarn@4.9.4 --activate - name: Install dependencies run: yarn install --immutable - name: Build Storybook - run: yarn build-storybook --output-dir storybook-static - - - name: Disable Jekyll - run: echo "" > storybook-static/.nojekyll + run: yarn build-storybook - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: storybook-static + path: ./storybook-static deploy: environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + url: ${{ steps.deploy.outputs.page_url }} + runs-on: ubuntu-latest needs: build + steps: - name: Deploy to GitHub Pages - id: deployment + id: deploy uses: actions/deploy-pages@v4 From 340f0d464dacb44f26d8d150d811ff34ed6df0f9 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Mon, 8 Dec 2025 10:54:26 +0100 Subject: [PATCH 07/11] fix: rename yml file --- .github/workflows/deploy-storybook.yml | 2 +- .github/workflows/static.yml | 48 -------------------------- 2 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index 49aef80e7..e970bd7f9 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -45,4 +45,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deploy - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index e970bd7f9..000000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Deploy Storybook to GitHub Pages - -on: - push: - branches: ["feature/storybook-ci", "feature/aip" ] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Enable Corepack - run: corepack enable - - - name: Set Yarn version to 4.9.4 - run: corepack prepare yarn@4.9.4 --activate - - - name: Install dependencies - run: yarn install --immutable - - - name: Build Storybook - run: yarn build-storybook - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./storybook-static - - deploy: - environment: - name: github-pages - url: ${{ steps.deploy.outputs.page_url }} - - runs-on: ubuntu-latest - needs: build - - steps: - - name: Deploy to GitHub Pages - id: deploy - uses: actions/deploy-pages@v4 From 022dd9cd3e80a761252c198e3bbd1e536640307e Mon Sep 17 00:00:00 2001 From: arianber7 Date: Mon, 8 Dec 2025 10:57:22 +0100 Subject: [PATCH 08/11] feat: [PROD-14971] set general layout and link scenario selector features with main navigation --- src/components/MainNavigation/MainNavigation.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/MainNavigation/MainNavigation.js b/src/components/MainNavigation/MainNavigation.js index b65c9d595..e3df0e2ff 100644 --- a/src/components/MainNavigation/MainNavigation.js +++ b/src/components/MainNavigation/MainNavigation.js @@ -268,7 +268,6 @@ export const MainNavigation = ({ onSectionChange, onDrawerWidthChange }) => { onUserMenuClick={handleUserMenuClick} isUserMenuOpen={isUserMenuOpen} /> - Date: Mon, 8 Dec 2025 11:01:07 +0100 Subject: [PATCH 09/11] feat: add status-bars in storybook --- .storybook/main.js | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.storybook/main.js b/.storybook/main.js index c581bcef3..fcd7c481c 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -21,6 +21,7 @@ const config = { staticDirs: ['../public'], webpackFinal: async (config) => { + // Remove ESLint rules Storybook injects config.module.rules = config.module.rules.filter( (rule) => !(rule.use && rule.use.some((u) => u.loader?.includes('eslint'))) ); diff --git a/package.json b/package.json index 347a6bce3..15385e46c 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "i18next-http-backend": "^3.0.2", "jwt-decode": "^4.0.0", "lucide-react": "^0.555.0", + "process": "^0.11.10", "prop-types": "^15.8.1", "react": "^19.1.1", "react-countdown": "^2.3.6", From a4cebb52161d735890bf00dd1828a860525c8f86 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Wed, 3 Dec 2025 23:17:37 +0100 Subject: [PATCH 10/11] feat: add breadcrumb bars in storybook --- src/layouts/TabLayout/TabLayout.js | 2 +- .../BreadcrumbBar/BreadcrumbBar.stories.js | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js diff --git a/src/layouts/TabLayout/TabLayout.js b/src/layouts/TabLayout/TabLayout.js index eacdc81f1..693bd586a 100644 --- a/src/layouts/TabLayout/TabLayout.js +++ b/src/layouts/TabLayout/TabLayout.js @@ -46,7 +46,7 @@ export const TabLayout = () => { }, [currentWorkspace?.status, getScenario]); const BreadcrumbBar = () => ( - + {currentWorkspace.data ? ( diff --git a/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js b/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js new file mode 100644 index 000000000..43352bd23 --- /dev/null +++ b/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js @@ -0,0 +1,66 @@ +/* eslint-disable react/prop-types */ +import { CircleArrowRight } from 'lucide-react'; +import React, { Fragment } from 'react'; +import { Link as MuiLink, Typography } from '@mui/material'; +import { AppBar } from '../../../components/AppBar'; + +export default { + title: 'Molecule/Breadcrumb Bar', + component: AppBar, + parameters: { + layout: 'fullscreen', + }, +}; + +const MockBreadcrumb = ({ workspaceName, scenarioName }) => ( + + + {workspaceName} + + + {scenarioName && ( + + + + Scenarios + + + )} + + {scenarioName && ( + <> + + + {scenarioName} + + + )} + +); + +const Template = (args) => ( + + + +); + +export const Default = Template.bind({}); +Default.args = { + workspaceName: 'Logistics Optimization', + scenarioName: 'Baseline Scenario', + currentScenario: { data: { name: 'Baseline Scenario' } }, +}; + +export const WorkspaceOnly = Template.bind({}); +WorkspaceOnly.args = { + workspaceName: 'Asset Aip Workspaces', + scenarioName: null, + currentScenario: null, +}; + +export const LongNames = Template.bind({}); +LongNames.args = { + workspaceName: 'Very Long Workspace Name To Test UI Layout', + scenarioName: 'Extremely Detailed Scenario', + currentScenario: { data: { name: 'Extremely Detailed Scenario Title Mock For Visual Testing Purposes' } }, +}; From 19b481ab11a5ca15cdb92cad543a49251f945947 Mon Sep 17 00:00:00 2001 From: arianber7 Date: Thu, 11 Dec 2025 09:54:32 +0100 Subject: [PATCH 11/11] fix: remove duplicated Bredcrumb-bar --- src/components/AppBar/AppBar.js | 5 +- src/components/StatusBar/StatusBar.js | 4 +- .../BreadcrumbBar/BreadcrumbBar.stories.js | 66 ------------------- 3 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js diff --git a/src/components/AppBar/AppBar.js b/src/components/AppBar/AppBar.js index 6850c780b..93ee01548 100644 --- a/src/components/AppBar/AppBar.js +++ b/src/components/AppBar/AppBar.js @@ -5,12 +5,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Button, AppBar as MuiAppBar, Toolbar } from '@mui/material'; import { StatusBar } from '../'; -import { useCurrentSimulationRunner } from '../../state/runner/hooks'; import { ThemeSwitch } from './components'; -export const AppBar = ({ children }) => { - const currentScenario = useCurrentSimulationRunner(); - +export const AppBar = ({ children, currentScenario }) => { return ( ({ }, locked: { label: 'Locked', - bg: theme.palette.neutral.neutral03.main, + bg: theme.palette.background.background02.main, text: theme.palette.neutral.neutral02.main, icon: , }, @@ -121,7 +121,7 @@ const StatusBar = ({ status, size, message, tooltip }) => { }, }} > - + diff --git a/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js b/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js deleted file mode 100644 index 43352bd23..000000000 --- a/src/stories/molecules/BreadcrumbBar/BreadcrumbBar.stories.js +++ /dev/null @@ -1,66 +0,0 @@ -/* eslint-disable react/prop-types */ -import { CircleArrowRight } from 'lucide-react'; -import React, { Fragment } from 'react'; -import { Link as MuiLink, Typography } from '@mui/material'; -import { AppBar } from '../../../components/AppBar'; - -export default { - title: 'Molecule/Breadcrumb Bar', - component: AppBar, - parameters: { - layout: 'fullscreen', - }, -}; - -const MockBreadcrumb = ({ workspaceName, scenarioName }) => ( - - - {workspaceName} - - - {scenarioName && ( - - - - Scenarios - - - )} - - {scenarioName && ( - <> - - - {scenarioName} - - - )} - -); - -const Template = (args) => ( - - - -); - -export const Default = Template.bind({}); -Default.args = { - workspaceName: 'Logistics Optimization', - scenarioName: 'Baseline Scenario', - currentScenario: { data: { name: 'Baseline Scenario' } }, -}; - -export const WorkspaceOnly = Template.bind({}); -WorkspaceOnly.args = { - workspaceName: 'Asset Aip Workspaces', - scenarioName: null, - currentScenario: null, -}; - -export const LongNames = Template.bind({}); -LongNames.args = { - workspaceName: 'Very Long Workspace Name To Test UI Layout', - scenarioName: 'Extremely Detailed Scenario', - currentScenario: { data: { name: 'Extremely Detailed Scenario Title Mock For Visual Testing Purposes' } }, -};