Skip to content

Commit

Permalink
jwa(front): Use new Editor component (kubeflow/kubeflow#6775)
Browse files Browse the repository at this point in the history
Import new Editor component from Kubeflow Common Library and replace
all instances of previous Ace Editor.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
  • Loading branch information
orfeas-k authored and Adembc committed Jun 23, 2024
1 parent e9bb0b9 commit 4e3bbe9
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 51 deletions.
16 changes: 7 additions & 9 deletions notebooks/crud-web-apps/jupyter/frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/ace-builds/src-min/ace.js",
"node_modules/ace-builds/src-min/mode-yaml.js",
"node_modules/ace-builds/src-min/theme-xcode.js"
"src/assets",
{
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "assets/monaco-editor"
}
],
"styles": ["src/styles.scss"],
"crossOrigin": "use-credentials",
"vendorChunk": true,
"extractLicenses": false,
Expand Down
44 changes: 15 additions & 29 deletions notebooks/crud-web-apps/jupyter/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion notebooks/crud-web-apps/jupyter/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"lodash": "^4.17.21",
"lodash-es": "^4.17.11",
"material-icons": "^0.7.3",
"ng2-ace-editor": "^0.3.9",
"monaco-editor": "^0.33.0",
"raw-loader": "^4.0.2",
"rxjs": "~6.6.7",
"tslib": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
>
<ng-container i18n> for the supported volumes and their specs</ng-container>

<div ace-editor mode="yaml" theme="xcode" [(text)]="yaml"></div>
<lib-monaco-editor
[(text)]="yaml"
language="yaml"
[readOnly]="false"
[height]="250"
class="editor"
></lib-monaco-editor>

<mat-error *ngIf="errorParsingYaml">{{ errorParsingYaml }}</mat-error>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
display: block;
}

[ace-editor] {
width: auto;
height: 250px;
.editor {
margin-top: 0.5rem;
margin-bottom: 1rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';

import { ExistingPvcModule } from './pvc/pvc.module';
import { AceEditorModule } from 'ng2-ace-editor';
import { EditorModule } from 'kubeflow';

@NgModule({
declarations: [ExistingVolumeComponent],
Expand All @@ -19,7 +19,7 @@ import { AceEditorModule } from 'ng2-ace-editor';
MatInputModule,
MatSelectModule,
ExistingPvcModule,
AceEditorModule,
EditorModule,
],
exports: [ExistingVolumeComponent],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
>
<ng-container i18n> for the supported volumes and their specs</ng-container>

<div ace-editor mode="yaml" theme="xcode" [(text)]="yaml"></div>
<lib-monaco-editor
[(text)]="yaml"
language="yaml"
[readOnly]="false"
[height]="250"
class="editor"
></lib-monaco-editor>

<mat-error *ngIf="errorParsingYaml">{{ errorParsingYaml }}</mat-error>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
display: block;
}

[ace-editor] {
width: auto;
height: 250px;
.editor {
margin-top: 0.5rem;
margin-bottom: 1rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { VolumeNameModule } from './name/name.module';
import { StorageClassModule } from './storage-class/storage-class.module';
import { VolumeAccessModesModule } from './access-modes/access-modes.module';
import { VolumeSizeModule } from './size/size.module';
import { AceEditorModule } from 'ng2-ace-editor';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { RokUrlModule } from './rok-url/rok-url.module';
import { EditorModule } from 'kubeflow';

@NgModule({
declarations: [NewVolumeComponent],
Expand All @@ -20,12 +20,12 @@ import { RokUrlModule } from './rok-url/rok-url.module';
StorageClassModule,
VolumeAccessModesModule,
VolumeSizeModule,
AceEditorModule,
MatInputModule,
MatSelectModule,
ReactiveFormsModule,
MatFormFieldModule,
RokUrlModule,
EditorModule,
],
exports: [NewVolumeComponent],
})
Expand Down

0 comments on commit 4e3bbe9

Please sign in to comment.