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

feat(ontology): form to create and edit property (DSP-1210) #406

Merged
merged 53 commits into from Mar 23, 2021

Conversation

kilchenmann
Copy link
Contributor

resolves DSP-1210

@kilchenmann kilchenmann marked this pull request as draft March 3, 2021 15:46
@kilchenmann kilchenmann self-assigned this Mar 3, 2021
@kilchenmann kilchenmann added the enhancement New feature or request label Mar 3, 2021
@kilchenmann kilchenmann marked this pull request as ready for review March 11, 2021 14:39
@kilchenmann kilchenmann requested a review from mdelez March 11, 2021 14:55
@kilchenmann kilchenmann requested review from mdelez and removed request for mdelez March 18, 2021 08:38
@kilchenmann
Copy link
Contributor Author

kilchenmann commented Mar 18, 2021

@mdelez Now it should be ready. Would you like to do the review? thanks

Copy link
Collaborator

@mdelez mdelez left a 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"}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compress -> Collapse

Copy link
Contributor Author

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',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needed?

Copy link
Contributor Author

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)
Copy link
Collaborator

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

Copy link
Contributor Author

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This property already exists."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ffbc7e8

@kilchenmann kilchenmann requested a review from mdelez March 18, 2021 10:51
@kilchenmann kilchenmann merged commit 91ebb68 into main Mar 23, 2021
@kilchenmann kilchenmann deleted the wip/dsp-1210-property-form branch March 23, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants