From f8dfab0ba1ec8f777a2379a82185fd362ccc9a13 Mon Sep 17 00:00:00 2001 From: Jim Risen <jim.dev@scichart.com> Date: Mon, 18 Dec 2023 18:09:29 +0200 Subject: [PATCH] Revert "chore(storybook): upgrade GH Action base again to the latest" This reverts commit 5f7627d6bcc2d9385b93a00c47d61a97360ff55e. --- .github/workflows/deploy.yaml | 2 +- README.md | 37 +++-------------------------------- src/SciChart.tsx | 2 +- src/stories/server/index.ts | 13 ------------ tsconfig-server.json | 27 ------------------------- 5 files changed, 5 insertions(+), 76 deletions(-) delete mode 100644 src/stories/server/index.ts delete mode 100644 tsconfig-server.json diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8bb80dc..2fd5eef 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - id: build-publish - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.2 + uses: bitovi/github-actions-storybook-to-github-pages@v1.0.1 with: path: storybook-static build_command: npm run build-storybook-docs diff --git a/README.md b/README.md index 9b3a897..c1fe5a0 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,3 @@ -// TODO -controls -description -required/optional -remove padding - -usage with typescript -3d charts - # SciChart.React - Official React Component Wrapper for SciChart.js: High Performance [JavaScript Chart Library](https://www.scichart.com/javascript-chart-features) SciChart.React requires core [SciChart.js](https://www.npmjs.com/package/scichart) package to work and uses it as a peer dependency. @@ -15,9 +6,9 @@ The SciChartReact itself is MIT licensed, find the core library licensing info a ## What does SciChart.React do? -- Neatly wraps up the lifecycle of SciChart.js into a React component to ensure proper initialisation and memory cleanup. -- Provides a number of ways to configure a chart (via JSON config or initialization function) -- Can be used to create complex dashboards linking multiple charts (demos are coming soon!) +- Neatly wraps up the lifecycle of SciChart.js into a React component to ensure proper initialisation and memory cleanup. +- Provides a number of ways to configure a chart (via JSON config or initialization function) +- Can be used to create complex dashboards linking multiple charts (demos are coming soon!) ## Getting Started @@ -178,25 +169,3 @@ function App() { - [Community forums](https://scichart.com/questions) - [Stackoverflow tag](https://stackoverflow.com/tags/scichart) - [Contact Us (Technical support or sales)](https://scichart.com/contact-us) - -### Project idea - -SciChart.js has some prerequisites and specific behavior when working with. A wrapper component for a specific framework, provides a boilerplate with the required setup and simplifies the usage of the core library within the . - -There are several points to consider: - -- a chart may require a root `div` element to be present in the DOM tree at the moment of initialization -- surfaces should not reference the same root element -- chart initialization is an asynchronous process (refer to [SciChartSurface.create]()/[SciChartSurface.createSingle]()/[SciChart3DSurface.create]()/[SciChart3DSurface.createSingle](), [SciChartPieSurface.create]() ) -- chart disposal should be managed explicitly and should be handled properly considering async initialization -- appropriate usage of the chart lifecycle, which could consist of multiple stages: (WASM initialization) -> surface initialization -> chart setup (series, annotations, animations). - To achieve a smooth drawing, it is important to properly control the order of code execution for chart setup, data fetching, displaying fallback, and the chart rendering itself. -- Handling React.StrictMode -- React component fallback -- Context shared with nested elements - -- Overview -- Group -- MemoryDebugWrapper - -- diff --git a/src/SciChart.tsx b/src/SciChart.tsx index 46a5730..8d2e552 100644 --- a/src/SciChart.tsx +++ b/src/SciChart.tsx @@ -76,9 +76,9 @@ function SciChartComponent< }; return () => { - groupContext?.removeChartFromGroup(chartRoot); // check if chart is already initialized or wait init to finish before deleting it sciChartSurfaceRef.current ? performCleanup() : initPromise.then(performCleanup); + groupContext?.removeChartFromGroup(chartRoot); }; }, []); diff --git a/src/stories/server/index.ts b/src/stories/server/index.ts deleted file mode 100644 index bdcbb87..0000000 --- a/src/stories/server/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as express from "express"; -const path = require("path"); - -const app = express(); -const port = parseInt(process.env.PORT || "3000", 10); -const host = process.env.HOST || "localhost"; - -const staticFolder = path.join(__dirname, "../../../storybook-static"); -app.use(express.static(staticFolder)); - -app.listen(port, () => { - console.log(`Example app listening at http://${host}:${port}`); -}); diff --git a/tsconfig-server.json b/tsconfig-server.json deleted file mode 100644 index cb4e3b2..0000000 --- a/tsconfig-server.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./dist", - "sourceMap": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "strictBindCallApply": true, - "strictPropertyInitialization": false, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "module": "commonjs", - "target": "es5", - "jsx": "react", - "allowJs": true, - "typeRoots": ["./src/types", "./node_modules/@types"], - "resolveJsonModule": true, - "esModuleInterop": false - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "testUnit", "src/static/*"] -}