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
feat(ontology): form to create and edit property (DSP-1210) #406
Conversation
@mdelez Now it should be ready. Would you like to do the review? thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple of small changes and the DSP-API connection should be mocked in any spec files we are using.
<span *ngIf="view === 'classes'"> | ||
<button mat-button (click)="expandClasses = !expandClasses" [disabled]="!ontoClasses.length"> | ||
<mat-icon>{{expandClasses ? 'compress' : 'expand'}}</mat-icon> | ||
{{expandClasses ? "Compress all" : "Expand all"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compress -> Collapse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in ffbc7e8
subPropOf: Constants.HasLinkTo, | ||
objectType: Constants.LinkValue, | ||
guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Searchbox', // 'Autocomplete', | ||
group: 'Link' | ||
}, | ||
// { | ||
// icon: 'picture_in_picture', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe yes. I had an ontology with a property "is part of", which is kind of link to another resource. This is something we have to discuss. And in the documentation I saw "link to external resource". But at the moment this property type is not yet fully implemented (because it's not an important one).
@@ -50,29 +164,107 @@ xdescribe('PropertyFormComponent', () => { | |||
{ | |||
provide: DspApiConnectionToken, | |||
useValue: new KnoraApiConnection(TestConfig.ApiConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably mock the DSP-API connection like we do in our other tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I think this is the "old" way. I found the same setup in 23 other files which have to be refactored in another branch.
Resolved this one in baf0a41
<mat-form-field class="small-field"> | ||
<input matInput placeholder="Property label *" formControlName="label" [matAutocomplete]="auto"> | ||
<mat-hint *ngIf="existingProperty"> | ||
Already existing property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This property already exists."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in ffbc7e8
resolves DSP-1210