Skip to content

Commit

Permalink
Add support for displaying showcases (#2433)
Browse files Browse the repository at this point in the history
* studio: setup showcase server integration

* virtual-assistant: introduce extension mechanism to add more views/tabs

* studio: properly load showcases on start

* dev: fix a problem with fast-refresh and data-space preview state

* BREAKING: add extension states to ApplicationStore

* showcase: implement basic virtual assistant panel

* showcase: add explorer tree

* showcase: add basic detail view

* showcase: improve display of showcase detail view

* showcase: support opening showcases from app menu
  • Loading branch information
akphi authored Jul 19, 2023
1 parent e2c85b6 commit ee14b1c
Show file tree
Hide file tree
Showing 50 changed files with 1,161 additions and 185 deletions.
11 changes: 11 additions & 0 deletions .changeset/eighty-lemons-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
7 changes: 7 additions & 0 deletions .changeset/empty-phones-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-application': patch
'@finos/legend-art': patch
---
10 changes: 10 additions & 0 deletions .changeset/serious-mails-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-art': patch
---
5 changes: 5 additions & 0 deletions .changeset/silly-rings-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-application-studio': major
---

**BREAKING CHANGE:** Renamed `getExtraEditorExtensionStateCreators()` and `EditorExtensionStateCreator` to `getExtraEditorExtensionStateBuilders()` and `EditorExtensionStateBuilder` respectively. Renamed `getExtraTestRunnerTabConfigurations()` and `TestRunnerTabConfiguration` to `getExtraTestRunnerViewConfigurations()` and `TestRunnerViewConfiguration` respectively.
9 changes: 9 additions & 0 deletions .changeset/tender-parents-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/legend-art': patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

const OFF = 2;
const WARN = 1;
const ERROR = 2;

Expand Down
3 changes: 3 additions & 0 deletions packages/legend-application-studio-bootstrap/scripts/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const setup = (outputDir) => {
query: {
url: 'http://localhost:9001/query',
},
showcase: {
url: 'http://localhost:9003/api',
},
documentation: {
url: 'https://legend.finos.org',
registry: [
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@finos/legend-query-builder": "workspace:*",
"@finos/legend-server-depot": "workspace:*",
"@finos/legend-server-sdlc": "workspace:*",
"@finos/legend-server-showcase": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@finos/legend-storage": "workspace:*",
"@testing-library/react": "14.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export enum LEGEND_STUDIO_APP_EVENT {
// TODO: consider to split this generic errors into more specific events
SDLC_MANAGER_FAILURE = 'sdlc.manager.failure',

// Showcase
// TODO: consider to split this generic errors into more specific events
SHOWCASE_MANAGER_FAILURE = 'showcase.manager.failure',

UPDATE_WORKSPACE__SUCCESS = 'sdlc.workspace-update.success',
PUSH_LOCAL_CHANGES__SUCCESS = 'sdlc.local-changes-push.success',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export interface LegendStudioApplicationConfigurationData
queryUrl?: string;
};
query?: { url: string };
showcase?: { url: string };
}

export class LegendStudioApplicationConfig extends LegendApplicationConfig {
Expand All @@ -140,8 +141,9 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
readonly engineQueryServerUrl?: string | undefined;
readonly depotServerUrl: string;
readonly sdlcServerUrl: string;
readonly SDLCServerBaseHeaders?: RequestHeaders | undefined;
readonly queryApplicationUrl: string | undefined;
readonly sdlcServerBaseHeaders?: RequestHeaders | undefined;
readonly queryApplicationUrl?: string | undefined;
readonly showcaseServerUrl?: string | undefined;

constructor(
input: LegendApplicationConfigurationInput<LegendStudioApplicationConfigurationData>,
Expand Down Expand Up @@ -188,7 +190,7 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
`Can't configure application: 'sdlc.url' field is missing or empty`,
),
);
this.SDLCServerBaseHeaders = input.configData.sdlc.baseHeaders;
this.sdlcServerBaseHeaders = input.configData.sdlc.baseHeaders;

// query
if (input.configData.query?.url) {
Expand All @@ -197,6 +199,13 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
);
}

// showcase
if (input.configData.showcase?.url) {
this.showcaseServerUrl = LegendApplicationConfig.resolveAbsoluteUrl(
input.configData.showcase.url,
);
}

// options
this.options = LegendStudioApplicationCoreOptions.create(
input.configData.extensions?.core ?? {},
Expand Down
Loading

0 comments on commit ee14b1c

Please sign in to comment.