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): new cardinality workflow (DSP-1652) #455

Merged
merged 17 commits into from Jun 7, 2021

Conversation

kilchenmann
Copy link
Contributor

@kilchenmann kilchenmann commented May 28, 2021

resolves DSP-1652, DSP-1656 and DSP-976

This PR contains the new workflow to create resource class and to add properties. It means: the user creates first a resource class. Then s/he has to go to this resource class and add the properties one by one. The GUI order can be changed at any time. It's the first iteration that helps to create new resource classes and to add properties incl. the cardinality. The update of a cardinality of existing properties in a resource class will be part of the next iteration.

I had to clean up some old (or now outdated) components:

  • There's no need anymore for a resource-class-form.service and the resourceClassFormSub because we have separated the cardinality from the resource-class. But I moved some of the general methods to handle the data in the ontology editor from this service to a new service called ontology.service.
  • The old component resource-class-property-form.component is not needed anymore, because we can use the property-form.component to handle the cardinality.

@kilchenmann kilchenmann self-assigned this Jun 1, 2021
@kilchenmann kilchenmann marked this pull request as draft June 1, 2021 08:04
@kilchenmann kilchenmann added bug A bug fix enhancement New feature or request refactor Refactor or redesign labels Jun 2, 2021
@kilchenmann kilchenmann marked this pull request as ready for review June 4, 2021 09:28
@kilchenmann
Copy link
Contributor Author

kilchenmann commented Jun 4, 2021

This is how it works at the moment:

Screen.Recording.2021-06-04.at.11.07.44.mov

Copy link
Contributor

@waychal waychal left a comment

Choose a reason for hiding this comment

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

I tried to test the functionality but my properties are not updating correctly in the resource class and for every action it gives me Bad request(400) error.
am I doing something wrong here?

Screen.Recording.2021-06-05.at.15.09.16.mov

@kilchenmann
Copy link
Contributor Author

I tried to test the functionality but my properties are not updating correctly in the resource class and for every action it gives me Bad request(400) error.

am I doing something wrong here?

As mentioned already in one of the meetings, it doesn't work with the test data like the anything ontology. Because this ontology is already in use. It means that the properties have already data in it. You have to start from scratch and create your own example ontology.

@mdelez
Copy link
Collaborator

mdelez commented Jun 7, 2021

Screen Shot 2021-06-07 at 11 08 31

For me, it works but I have to refresh the page to see any changes I've made. However the response has the correct data I believe. I was trying to add a Date of Birth (DOB) property to my class. I'm using DSP-API v13.9.2 and there are no console errors 🤔

@kilchenmann
Copy link
Contributor Author

kilchenmann commented Jun 7, 2021

For me, it works but I have to refresh the page to see any changes I've made. However the response has the correct data I believe. I was trying to add a Date of Birth (DOB) property to my class. I'm using DSP-API v13.9.2 and there are no console errors 🤔

It reloads the view when I connect to the API on the test-server (v13.9.1), but not when using the local instance (v13.9.2). It has nothing to do with the API version, but maybe with an async time issue and for sure with the closeDialog.emit() command in the property-form.component.ts. It runs twice (s. my comment here). I'll fix it...
--> resolved in b56a43a

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.

Well done :)

@kilchenmann kilchenmann merged commit f1d049c into main Jun 7, 2021
@kilchenmann kilchenmann deleted the wip/dsp-1652-new-cardinality-workflow branch June 7, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug fix enhancement New feature or request refactor Refactor or redesign
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants