Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes #883

Merged
merged 9 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ "repo": "finos/legend-studio" }
],
"commit": false,
"linked": [["@finos/legend-*-app", "@finos/legend-*-deployment"]],
"fixed": [["@finos/legend-*-app", "@finos/legend-*-deployment"]],
"access": "public",
"baseBranch": "master",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
Expand Down
22 changes: 22 additions & 0 deletions .changeset/four-bags-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-application': patch
'@finos/legend-art': patch
'@finos/legend-dev-utils': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-extension-dsl-serializer': patch
'@finos/legend-extension-dsl-text': patch
'@finos/legend-extension-external-language-morphir': patch
'@finos/legend-extension-external-store-service': patch
'@finos/legend-graph': patch
'@finos/legend-query': patch
'@finos/legend-query-app': patch
'@finos/legend-studio': patch
'@finos/legend-studio-app': patch
'@finos/legend-studio-extension-management-toolkit': patch
'@finos/legend-studio-extension-query-builder': patch
'@finos/legend-taxonomy': patch
'@finos/legend-taxonomy-app': patch
'@finos/stylelint-config-legend-studio': patch
---
10 changes: 10 additions & 0 deletions .changeset/sixty-wasps-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-application': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-extension-dsl-diagram': patch
'@finos/legend-graph': patch
'@finos/legend-query': patch
'@finos/legend-studio': patch
'@finos/legend-taxonomy': patch
---
5 changes: 5 additions & 0 deletions .changeset/twenty-sheep-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-graph': patch
---

Add a temporary workaround to not fail graph building when there are unresolved class mapping IDs (see [#880](https://github.com/finos/legend-studio/issues/880) for more details).
3 changes: 3 additions & 0 deletions .changeset/wet-deers-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@finos/legend-dev-utils': patch
---
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ yarn changeset:cli

Make sure to install [Node.js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/). For IDE, we highly recommend [Visual Studio Code](https://code.visualstudio.com/). Also, to assist development, don't forget to install [ESLint](https://eslint.org/) and [Stylelint](https://stylelint.io/) plugins to help you catch problems while writing code; and install [Prettier](https://prettier.io/) plugin to help you auto-format code. Last but not least, run the `setup` script.

Studio relies on SDLC and Engine servers as its backend. If you don't have these servers [setup to run locally](https://legend.finos.org/docs/installation/maven-install-guide#installation-steps), you can make use of [this Docker compose project](https://github.com/finos/legend/tree/master/installers/docker-compose/legend-studio-dev) to quickly set them up.
Studio relies _minimumly_ on SDLC and Engine servers as its backend. To quickly set these up, use our development [Docker compose](https://github.com/finos/legend/tree/master/installers/docker-compose/legend-studio-dev). If you need to debug and code on the backend at the same time, follow [this guide](./fixtures/legend-docker-setup/studio-dev-setup/README.md) to set them up using `maven`.

```sh
# Install dependencies, link and set up the workspaces, and build the workspaces to make sure your project is in good shape.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The codebase and home of Legend applications: `Legend Studio`, `Legend Query`, e

## Getting started

Make sure you have SDLC and Engine servers running. If you don't have these servers [setup to run locally](https://legend.finos.org/docs/installation/maven-install-guide#installation-steps), you can make use of [this Docker compose project](https://github.com/finos/legend/tree/master/installers/docker-compose/legend-studio-dev) to quickly set them up.
Make sure you have _at least_ SDLC and Engine servers running. To quickly set these up, use our development [Docker compose](https://github.com/finos/legend/tree/master/installers/docker-compose/legend-studio-dev). If you need to debug and code on the backend at the same time, follow [this guide](./fixtures/legend-docker-setup/studio-dev-setup/README.md) to set them up using `maven`.

Make sure you have `Yarn` installed. Run the following commands in order.
Last but not least, make sure you have `Yarn` installed. Run the following commands in order.

```bash
yarn install
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"deployment": {
"mode": "TEST_IGNORE_FUNCTION_MATCH"
},
"logging": {
"level": "INFO",
"appenders": [
{
"type": "console",
"logFormat": "%msg\r\n"
}
]
},
"pac4j": {
"bypassPaths": ["/api/server/v1/info"],
"clients": [
{
"org.pac4j.core.client.direct.AnonymousClient": {}
}
],
"mongoSession": {
"enabled": false
}
},
"opentracing": {
"elastic": "",
"zipkin": "",
"uri": "",
"authenticator": {
"principal": "",
"keytab": ""
}
},
"swagger": {
"title": "Legend Engine",
"resourcePackage": "org.finos.legend",
"uriPrefix": "/api"
},
"server": {
"type": "simple",
"applicationContextPath": "/",
"adminContextPath": "/admin",
"connector": {
"maxRequestHeaderSize": "32KiB",
"type": "http",
"port": 6060
},
"requestLog": {
"appenders": []
}
},
"metadataserver": {
"pure": {
"host": "127.0.0.1",
"port": 8090
},
"alloy": {
"host": "127.0.0.1",
"port": 8090,
"prefix": "/depot/api"
}
},
"temporarytestdb": {
"port": 9092
},
"relationalexecution": {
"tempPath": "/tmp/"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.8'

services:
engine:
container_name: engine
image: finos/legend-engine-server:snapshot
ports:
- 6060:6060
networks:
- legend
volumes:
- ./config:/config
# NOTE: the Java CLI wildcard must be wrapped by quotes
# See https://stackoverflow.com/questions/14722657/java-classpath-wildcard-behaviour/14722763
command: >
java
-cp /app/bin/"*"
org.finos.legend.engine.server.Server
server /config/engine-config.json

networks:
legend: {}
akphi marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions fixtures/legend-docker-setup/studio-dev-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Studio Docker Compose Dev Setup

[placeholder]
2 changes: 1 addition & 1 deletion fixtures/legend-mock-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"fastify": "3.27.2",
"fastify-cors": "6.0.2"
"fastify-cors": "6.0.3"
},
"devDependencies": {
"@finos/legend-dev-utils": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,24 @@
"@finos/eslint-plugin-legend-studio": "workspace:*",
"@finos/legend-dev-utils": "workspace:*",
"@finos/stylelint-config-legend-studio": "workspace:*",
"@types/jest": "27.4.0",
"@types/node": "17.0.19",
"@types/jest": "27.4.1",
"@types/node": "17.0.21",
"chalk": "5.0.0",
"cross-env": "7.0.3",
"envinfo": "7.8.1",
"eslint": "8.9.0",
"fs-extra": "10.0.1",
"fs-extra": "10.0.0",
"husky": "7.0.4",
"inquirer": "8.2.0",
"jest": "27.5.1",
"lint-staged": "12.3.4",
"micromatch": "4.0.4",
"prettier": "2.5.1",
"rimraf": "3.0.2",
"sass": "1.49.8",
"sass": "1.49.9",
"semver": "7.3.5",
"sort-package-json": "1.54.0",
"stylelint": "14.5.2",
"stylelint": "14.5.3",
"typescript": "4.5.5",
"yargs": "17.3.1"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin/src/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ES_RULES = {
'dot-notation': [ERROR, { allowKeywords: true }],
'eol-last': [WARN, 'always'],
eqeqeq: ERROR,
'func-call-spacing': ERROR,
'func-call-spacing': OFF,
'guard-for-in': ERROR,
'jsx-quotes': ERROR,
'key-spacing': WARN,
Expand Down Expand Up @@ -135,6 +135,7 @@ const TYPESCRIPT_RULES = {
WARN,
{ allowTypedFunctionExpressions: true },
],
'@typescript-eslint/func-call-spacing': ERROR,
'@typescript-eslint/no-inferrable-types': [WARN, { ignoreParameters: true }],
'@typescript-eslint/no-var-requires': OFF,
'@typescript-eslint/no-unused-vars': [
Expand Down
4 changes: 2 additions & 2 deletions packages/legend-application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11",
"@types/react-router-dom": "5.3.2",
"history": "5.2.0",
"history": "5.3.0",
"mobx": "6.4.1",
"mobx-react-lite": "3.3.0",
"monaco-editor": "0.32.1",
Expand All @@ -65,7 +65,7 @@
"jest": "27.5.1",
"npm-run-all": "4.1.5",
"rimraf": "3.0.2",
"sass": "1.49.8",
"sass": "1.49.9",
"typescript": "4.5.5"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/legend-art/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"jest": "27.5.1",
"npm-run-all": "4.1.5",
"rimraf": "3.0.2",
"sass": "1.49.8",
"sass": "1.49.9",
"typescript": "4.5.5"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/legend-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"mini-css-extract-plugin": "2.5.3",
"monaco-editor": "0.32.1",
"monaco-editor-webpack-plugin": "7.0.1",
"postcss": "8.4.6",
"postcss": "8.4.7",
"postcss-loader": "6.2.1",
"react-refresh": "0.11.0",
"resolve": "1.22.0",
"sass": "1.49.8",
"sass": "1.49.9",
"sass-loader": "12.6.0",
"typescript": "4.5.5",
"webpack": "5.69.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/legend-extension-dsl-data-space/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"jest": "27.5.1",
"npm-run-all": "4.1.5",
"rimraf": "3.0.2",
"sass": "1.49.8",
"sass": "1.49.9",
"typescript": "4.5.5"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { useRef, useEffect } from 'react';
import { useRef, useEffect, forwardRef } from 'react';
import { observer } from 'mobx-react-lite';
import { useResizeDetector } from 'react-resize-detector';
import {
Expand Down Expand Up @@ -58,13 +58,13 @@ interface DataSpaceViewerActivityConfig {
}

const DataSpaceDiagramCanvas = observer(
(
props: {
forwardRef<
HTMLDivElement,
{
dataSpaceViewerState: DataSpaceViewerState;
diagram: Diagram;
},
ref: React.Ref<HTMLDivElement>,
) => {
}
>(function DataSpaceDiagramCanvas(props, ref) {
const { dataSpaceViewerState, diagram } = props;
const diagramCanvasRef =
ref as React.MutableRefObject<HTMLDivElement | null>;
Expand Down Expand Up @@ -102,8 +102,7 @@ const DataSpaceDiagramCanvas = observer(
onContextMenu={(event): void => event.preventDefault()}
/>
);
},
{ forwardRef: true },
}),
);

type DiagramOption = { label: string; value: Diagram };
Expand Down
2 changes: 1 addition & 1 deletion packages/legend-extension-dsl-diagram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"jest-canvas-mock": "2.3.1",
"npm-run-all": "4.1.5",
"rimraf": "3.0.2",
"sass": "1.49.8",
"sass": "1.49.9",
"typescript": "4.5.5"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
* limitations under the License.
*/

import { useRef, useState, useEffect, useCallback, Fragment } from 'react';
import {
useRef,
useState,
useEffect,
useCallback,
Fragment,
forwardRef,
} from 'react';
import { useResizeDetector } from 'react-resize-detector';
import { type DropTargetMonitor, useDrop } from 'react-dnd';
import { observer } from 'mobx-react-lite';
Expand Down Expand Up @@ -99,12 +106,12 @@ import { Point } from '../../models/metamodels/pure/packageableElements/diagram/
import type { DSLDiagram_LegendStudioPlugin_Extension } from './DSLDiagram_LegendStudioPlugin_Extension';

const DiagramEditorContextMenu = observer(
(
props: {
forwardRef<
HTMLDivElement,
{
diagramEditorState: DiagramEditorState;
},
ref: React.Ref<HTMLDivElement>,
) => {
}
>(function DiagramEditorContextMenu(props, ref) {
const { diagramEditorState } = props;
const editorStore = useEditorStore();
const extraClassViewContextMenuItems =
Expand All @@ -129,8 +136,7 @@ const DiagramEditorContextMenu = observer(
))
: [];
return <MenuContent>{extraClassViewContextMenuItems}</MenuContent>;
},
{ forwardRef: true },
}),
);

const DiagramRendererHotkeyInfosModal = observer(
Expand Down Expand Up @@ -1142,12 +1148,12 @@ const DiagramEditorInlinePropertyEditor = observer(
);

const DiagramEditorDiagramCanvas = observer(
(
props: {
forwardRef<
HTMLDivElement,
{
diagramEditorState: DiagramEditorState;
},
ref: React.Ref<HTMLDivElement>,
) => {
}
>(function DiagramEditorDiagramCanvas(props, ref) {
const { diagramEditorState } = props;
const diagramCanvasRef =
ref as React.MutableRefObject<HTMLDivElement | null>;
Expand Down Expand Up @@ -1223,8 +1229,7 @@ const DiagramEditorDiagramCanvas = observer(
onContextMenu={(event): void => event.preventDefault()}
/>
);
},
{ forwardRef: true },
}),
);

const DiagramEditorHeader = observer(
Expand Down
Loading