Skip to content

Commit

Permalink
datacube: componentization (#3556)
Browse files Browse the repository at this point in the history
* datacube: reorganize states

* datacube: componentize datacube

* repl: slim down application boilerplate

* establish @finos/legend-data-cube package

* refactor: move core code-editor support logic to @finos/legend-code-editor

* datacube: enable pagination by default

* datacube: cleanup unnecessary deps

* datacube: reorganize application engine

* datacube: separate datacube from REPL code

* move datacube to @finos/legend-data-cube

* add changeset

* bump dependencies
  • Loading branch information
akphi authored Sep 26, 2024
1 parent ea6c454 commit 12ea153
Show file tree
Hide file tree
Showing 307 changed files with 2,619 additions and 2,861 deletions.
19 changes: 19 additions & 0 deletions .changeset/angry-geckos-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-query-builder': patch
'@finos/legend-data-cube': patch
'@finos/legend-lego': patch
---
22 changes: 22 additions & 0 deletions .changeset/flat-kangaroos-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-query-builder': patch
'@finos/legend-application': patch
'@finos/legend-code-editor': patch
'@finos/legend-data-cube': patch
'@finos/legend-shared': patch
'@finos/legend-lego': patch
---
5 changes: 5 additions & 0 deletions .changeset/fresh-news-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-application-repl': major
---

**BREAKING CHANGE:** Separate core DataCube code to `@finos/legend-data-cube`
20 changes: 20 additions & 0 deletions .changeset/great-apples-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-query-builder': patch
'@finos/legend-code-editor': patch
'@finos/legend-data-cube': patch
'@finos/legend-lego': patch
---
2 changes: 1 addition & 1 deletion .changeset/hip-tables-wonder.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-store-flat-data': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-data-cube': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
Expand Down
22 changes: 22 additions & 0 deletions .changeset/kind-carrots-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-query-builder': patch
'@finos/legend-application': patch
'@finos/legend-code-editor': patch
'@finos/legend-data-cube': patch
'@finos/legend-shared': patch
'@finos/legend-lego': patch
---
5 changes: 5 additions & 0 deletions .changeset/lazy-lemons-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-lego': major
---

**BREAKING CHANGE:** Split core code editor utilities (theming, Pure language support, etc.) which are not dependent on `@finos/legend-application` to `@finos/legend-code-editor`.
2 changes: 1 addition & 1 deletion .changeset/rich-dolls-protect.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-store-flat-data': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-data-cube': patch
'@finos/legend-data-cube': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
Expand Down
34 changes: 34 additions & 0 deletions .changeset/rude-suns-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@finos/legend-application-pure-ide-deployment': patch
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-application-studio-deployment': patch
'@finos/legend-extension-store-service-store': patch
'@finos/legend-vscode-extension-dependencies': patch
'@finos/legend-application-query-deployment': patch
'@finos/legend-application-repl-deployment': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-store-relational': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-persistence': patch
'@finos/legend-extension-store-flat-data': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-service': patch
'@finos/legend-application-pure-ide': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-application-query': patch
'@finos/legend-application-repl': patch
'@finos/legend-server-showcase': patch
'@finos/legend-query-builder': patch
'@finos/legend-application': patch
'@finos/legend-code-editor': patch
'@finos/legend-server-sdlc': patch
'@finos/legend-data-cube': patch
'@finos/legend-dev-utils': patch
'@finos/legend-shared': patch
'@finos/legend-graph': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
2 changes: 1 addition & 1 deletion .changeset/silver-pugs-study.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
'@finos/legend-application-data-cube': patch
'@finos/legend-data-cube': patch
'@finos/legend-application-repl': patch
---
5 changes: 5 additions & 0 deletions .changeset/spotty-bobcats-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-application': major
---

**BREAKING CHANGE:** Move `DocumentationEntry` to `@finos/legend-shared`.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@finos/eslint-plugin-legend-studio": "workspace:*",
"@finos/legend-dev-utils": "workspace:*",
"@finos/stylelint-config-legend-studio": "workspace:*",
"@types/node": "22.7.0",
"@types/node": "22.7.2",
"chalk": "5.3.0",
"cross-env": "7.0.3",
"envinfo": "7.14.0",
Expand Down
1 change: 0 additions & 1 deletion packages/legend-application-data-cube/CHANGELOG.md

This file was deleted.

3 changes: 0 additions & 3 deletions packages/legend-application-data-cube/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions packages/legend-application-data-cube/style/data-cube.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"typescript": "5.6.2",
"webpack": "5.94.0",
"webpack": "5.95.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.1.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/legend-application-pure-ide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
"dependencies": {
"@finos/legend-application": "workspace:*",
"@finos/legend-art": "workspace:*",
"@finos/legend-code-editor": "workspace:*",
"@finos/legend-extension-dsl-diagram": "workspace:*",
"@finos/legend-graph": "workspace:*",
"@finos/legend-lego": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@types/react": "18.3.9",
"@types/react-dom": "18.3.0",
"mobx": "6.13.2",
"mobx": "6.13.3",
"mobx-react-lite": "4.0.7",
"monaco-editor": "0.52.0",
"react": "18.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ import {
LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG,
} from '../__lib__/LegendPureIDECommand.js';
import { PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL } from '../stores/PureFileEditorUtils.js';
import {
configureCodeEditorComponent,
setupPureLanguageService,
} from '@finos/legend-lego/code-editor';
import { setupPureLanguageService } from '@finos/legend-code-editor';
import { configureCodeEditorComponent } from '@finos/legend-lego/code-editor';

export class Core_LegendPureIDEApplicationPlugin extends LegendPureIDEApplicationPlugin {
static NAME = packageJson.extensions.applicationPureIDEPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { DiagramEditor } from './DiagramEditor.js';
import { usePureIDEStore } from '../PureIDEStoreProvider.js';
import { PURE_DiagramIcon } from '../shared/ConceptIconUtils.js';
import { TabManager, type TabState } from '@finos/legend-lego/application';
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-lego/code-editor';
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';

const EditorGroupSplashScreen: React.FC = () => {
const commandListWidth = 300;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
CODE_EDITOR_THEME,
getBaseCodeEditorOptions,
moveCursorToPosition,
} from '@finos/legend-lego/code-editor';
} from '@finos/legend-code-editor';

const POSITION_PATTERN = /[0-9]+(?::[0-9]+)?/;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
getBaseCodeEditorOptions,
moveCursorToPosition,
PURE_CODE_EDITOR_WORD_SEPARATORS,
} from '@finos/legend-lego/code-editor';
} from '@finos/legend-code-editor';
import { clsx, Dialog, WordWrapIcon } from '@finos/legend-art';
import { usePureIDEStore } from '../PureIDEStoreProvider.js';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ import {
import {
CODE_EDITOR_LANGUAGE,
CODE_EDITOR_THEME,
disposeCodeEditor,
getBaseConsoleOptions,
} from '@finos/legend-lego/code-editor';
getBaseCodeEditorOptions,
} from '@finos/legend-code-editor';
import { disposeCodeEditor } from '@finos/legend-lego/code-editor';

const TestTreeNodeContainer = observer(
(
Expand Down Expand Up @@ -360,7 +360,26 @@ const TestResultConsole: React.FC<{
if (!editor && textInputRef.current) {
const element = textInputRef.current;
const newEditor = monacoEditorAPI.create(element, {
...getBaseConsoleOptions(),
...getBaseCodeEditorOptions(),
fontSize: 12,
extraEditorClassName: 'monaco-editor--small-font',
readOnly: true,
glyphMargin: false,
folding: false,
lineNumbers: 'off',
lineDecorationsWidth: 10,
lineNumbersMinChars: 0,
minimap: {
enabled: false,
},
guides: {
bracketPairs: false,
bracketPairsHorizontal: false,
highlightActiveBracketPair: false,
indentation: false,
highlightActiveIndentation: false,
},
renderLineHighlight: 'none',
theme: CODE_EDITOR_THEME.DEFAULT_DARK,
language: CODE_EDITOR_LANGUAGE.TEXT,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
setErrorMarkers,
type CodeEditorPosition,
CODE_EDITOR_LANGUAGE,
} from '@finos/legend-lego/code-editor';
} from '@finos/legend-code-editor';
import { DIRECTORY_PATH_DELIMITER } from '@finos/legend-graph';
import {
assertErrorThrown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CODE_EDITOR_LANGUAGE,
isTokenOneOf,
PURE_GRAMMAR_TOKEN,
} from '@finos/legend-lego/code-editor';
} from '@finos/legend-code-editor';
import {
ELEMENT_PATH_DELIMITER,
extractElementNameFromPath,
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-pure-ide/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{ "path": "../legend-shared/tsconfig.build.json" },
{ "path": "../legend-application/tsconfig.build.json" },
{ "path": "../legend-art/tsconfig.build.json" },
{ "path": "../legend-code-editor/tsconfig.build.json" },
{ "path": "../legend-lego/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-diagram/tsconfig.build.json" }
]
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-pure-ide/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{ "path": "../legend-shared" },
{ "path": "../legend-application" },
{ "path": "../legend-art" },
{ "path": "../legend-code-editor" },
{ "path": "../legend-lego" },
{ "path": "../legend-extension-dsl-diagram" }
]
Expand Down
2 changes: 1 addition & 1 deletion packages/legend-application-query-deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"typescript": "5.6.2",
"webpack": "5.94.0",
"webpack": "5.95.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.1.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/legend-application-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"dependencies": {
"@finos/legend-application": "workspace:*",
"@finos/legend-art": "workspace:*",
"@finos/legend-code-editor": "workspace:*",
"@finos/legend-extension-dsl-data-space": "workspace:*",
"@finos/legend-graph": "workspace:*",
"@finos/legend-lego": "workspace:*",
Expand All @@ -56,7 +57,7 @@
"@testing-library/react": "16.0.1",
"@types/react": "18.3.9",
"@types/react-dom": "18.3.0",
"mobx": "6.13.2",
"mobx": "6.13.3",
"mobx-react-lite": "4.0.7",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ import { CloneQueryServiceSetup } from './CloneQueryServiceSetup.js';
import { QueryProductionizerSetup } from './QueryProductionizerSetup.js';
import { UpdateExistingServiceQuerySetup } from './UpdateExistingServiceQuerySetup.js';
import { LoadProjectServiceQuerySetup } from './LoadProjectServiceQuerySetup.js';
import {
configureCodeEditorComponent,
setupPureLanguageService,
} from '@finos/legend-lego/code-editor';
import { setupPureLanguageService } from '@finos/legend-code-editor';
import {
generateDataSpaceQueryCreatorRoute,
generateDataSpaceQuerySetupRoute,
Expand All @@ -89,6 +86,7 @@ import { QueryEditorExistingQueryHeader } from './QueryEditor.js';
import { DataSpaceTemplateQueryCreatorStore } from '../stores/data-space/DataSpaceTemplateQueryCreatorStore.js';
import { createViewSDLCProjectHandler } from '../stores/data-space/DataSpaceQueryBuilderHelper.js';
import { DataSpaceQueryCreatorStore } from '../stores/data-space/DataSpaceQueryCreatorStore.js';
import { configureCodeEditorComponent } from '@finos/legend-lego/code-editor';

export class Core_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
static NAME = packageJson.extensions.applicationQueryPlugin;
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-query/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ "path": "../legend-extension-dsl-data-space/tsconfig.build.json" },
{ "path": "../legend-query-builder/tsconfig.build.json" },
{ "path": "../legend-art/tsconfig.build.json" },
{ "path": "../legend-code-editor/tsconfig.build.json" },
{ "path": "../legend-lego/tsconfig.build.json" }
]
}
1 change: 1 addition & 0 deletions packages/legend-application-query/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{ "path": "../legend-query-builder" },
{ "path": "../legend-extension-dsl-data-space" },
{ "path": "../legend-art" },
{ "path": "../legend-code-editor" },
{ "path": "../legend-lego" }
]
}
Loading

0 comments on commit 12ea153

Please sign in to comment.