From 6b6577a0bc1e8e7886f244da6c18516448731f54 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Thu, 4 Sep 2025 15:53:25 -0700 Subject: [PATCH 1/2] implemented markdown descriptions --- core/gui/angular.json | 7 +- core/gui/package.json | 7 +- core/gui/src/app/app.module.ts | 4 + .../user/list-item/list-item.component.html | 38 +- .../user/list-item/list-item.component.scss | 2 +- .../user/list-item/list-item.component.ts | 54 +- .../markdown-description.component.html | 84 ++ .../markdown-description.component.scss | 230 +++++ .../markdown-description.component.ts | 192 ++++ .../dataset-detail.component.html | 4 +- .../detail/hub-workflow-detail.component.html | 2 +- core/gui/yarn.lock | 927 ++++++++++++++++-- 12 files changed, 1442 insertions(+), 109 deletions(-) create mode 100644 core/gui/src/app/dashboard/component/user/shared/markdown-description/markdown-description.component.html create mode 100644 core/gui/src/app/dashboard/component/user/shared/markdown-description/markdown-description.component.scss create mode 100644 core/gui/src/app/dashboard/component/user/shared/markdown-description/markdown-description.component.ts diff --git a/core/gui/angular.json b/core/gui/angular.json index a76ee354362..70475bba4f5 100644 --- a/core/gui/angular.json +++ b/core/gui/angular.json @@ -29,10 +29,15 @@ "node_modules/jointjs/css/themes/default.css", "node_modules/ng-zorro-antd/ng-zorro-antd.min.css", "node_modules/ng-zorro-antd/resizable/style/index.min.css", + "node_modules/bootstrap/dist/css/bootstrap.css", + "node_modules/bootstrap-markdown/css/bootstrap-markdown.min.css", + "node_modules/font-awesome/css/font-awesome.css", "src/styles.scss" ], "scripts": [ - "./node_modules/marked/marked.min.js" + "./node_modules/marked/marked.min.js", + "node_modules/jquery/dist/jquery.js", + "node_modules/bootstrap-markdown/js/bootstrap-markdown.js" ], "customWebpackConfig": { "path": "./custom-webpack.config.js" diff --git a/core/gui/package.json b/core/gui/package.json index e8aefd32f05..5d41c49796f 100644 --- a/core/gui/package.json +++ b/core/gui/package.json @@ -46,7 +46,9 @@ "@types/lodash-es": "4.17.4", "@types/plotly.js-basic-dist-min": "2.12.4", "ajv": "8.10.0", + "angular-markdown-editor": "^3.1.1", "backbone": "1.4.1", + "bootstrap": "^5.3.8", "content-disposition": "0.5.4", "dagre": "0.8.5", "deep-map": "2.0.0", @@ -56,6 +58,7 @@ "fuse.js": "6.5.3", "html2canvas": "1.4.1", "jointjs": "3.5.4", + "jquery": "^3.7.1", "js-abbreviation-number": "1.4.0", "jszip": "3.10.1", "lodash-es": "4.17.21", @@ -70,7 +73,7 @@ "ngx-file-drop": "16.0.0", "ngx-image-viewer": "1.0.13", "ngx-json-viewer": "3.2.1", - "ngx-markdown": "16.0.0", + "ngx-markdown": "^20.1.0", "papaparse": "5.4.1", "path-browserify": "1.0.1", "plotly.js-basic-dist-min": "2.29.0", @@ -111,11 +114,13 @@ "@nrwl/nx-cloud": "19.1.0", "@nx/angular": "20.0.3", "@types/backbone": "1.4.15", + "@types/bootstrap": "^5", "@types/content-disposition": "0", "@types/dagre": "0.7.47", "@types/file-saver": "2.0.5", "@types/graphlib": "2.1.8", "@types/jasmine": "4.6.4", + "@types/jquery": "^3", "@types/json-schema": "7.0.9", "@types/lodash": "4.14.179", "@types/node": "18.15.5", diff --git a/core/gui/src/app/app.module.ts b/core/gui/src/app/app.module.ts index 13759e6e55a..2ae9f6d5fad 100644 --- a/core/gui/src/app/app.module.ts +++ b/core/gui/src/app/app.module.ts @@ -172,6 +172,8 @@ import { AdminSettingsComponent } from "./dashboard/component/admin/settings/adm import { catchError, of } from "rxjs"; import { FormlyRepeatDndComponent } from "./common/formly/repeat-dnd/repeat-dnd.component"; import { NzInputNumberModule } from "ng-zorro-antd/input-number"; +import { MarkdownDescriptionComponent } from "./dashboard/component/user/shared/markdown-description/markdown-description.component"; +import { AngularMarkdownEditorModule } from "angular-markdown-editor"; registerLocaleData(en); @@ -264,6 +266,7 @@ registerLocaleData(en); HubSearchResultComponent, ComputingUnitSelectionComponent, AdminSettingsComponent, + MarkdownDescriptionComponent, ], imports: [ BrowserModule, @@ -330,6 +333,7 @@ registerLocaleData(en); NzDividerModule, NzProgressModule, NzInputNumberModule, + AngularMarkdownEditorModule.forRoot(), ], providers: [ provideNzI18n(en_US), diff --git a/core/gui/src/app/dashboard/component/user/list-item/list-item.component.html b/core/gui/src/app/dashboard/component/user/list-item/list-item.component.html index a1f78f25326..30e70bff1a4 100644 --- a/core/gui/src/app/dashboard/component/user/list-item/list-item.component.html +++ b/core/gui/src/app/dashboard/component/user/list-item/list-item.component.html @@ -60,9 +60,9 @@
-
+ nzFlex="30px"> +
@@ -108,9 +108,9 @@
- {{ entry.description ? entry.description.slice(0, 200) : (hovering) ? 'Write a description...' : '' }} + {{ getCleanDescription() }}