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(resource-instance): add subclass creation support (DEV-553) #686

Merged
merged 11 commits into from Mar 22, 2022

Conversation

mdelez
Copy link
Collaborator

@mdelez mdelez commented Mar 18, 2022

resolves DEV-553

@mdelez mdelez added the enhancement New feature or request label Mar 18, 2022
@mdelez mdelez self-assigned this Mar 18, 2022
@mdelez mdelez marked this pull request as ready for review Mar 21, 2022
@mdelez mdelez requested a review from kilchenmann as a code owner Mar 21, 2022
@kilchenmann kilchenmann changed the title feat(new-resource-instance-form): add subclass creation support (DEV-553) feat(resource-instance): add subclass creation support (DEV-553) Mar 21, 2022
@mdelez
Copy link
Collaborator Author

mdelez commented Mar 21, 2022

@kilchenmann to test this, use npm run start-with-ls-test-server and then create a new page (image) resource under the Stardom project. You'll now see more than just create new [Piece] under the Page leaflet property. The design isn't the best....
Screen Shot 2022-03-21 at 15 18 14

Copy link
Contributor

@kilchenmann kilchenmann left a comment

I will check out the branch and test it. Here only a few comments after a quick code review.

// console.log('parentResource: ', this.parentResource);
// console.log('propDef: ', this.propDef);
// console.log('resourceClassDef: ', this.resourceClassDef);
Copy link
Contributor

@kilchenmann kilchenmann Mar 21, 2022

Choose a reason for hiding this comment

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

can we remove these commented lines?

@@ -82,6 +86,7 @@ export class CreateLinkResourceComponent implements OnInit {
}

onSubmit() {
console.log('clicked');
Copy link
Contributor

@kilchenmann kilchenmann Mar 21, 2022

Choose a reason for hiding this comment

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

should also be removed.

@@ -128,7 +130,7 @@ export class DisplayEditComponent implements OnInit {
}

ngOnInit() {

this.ontoIri = this.parentResource.type.split('#')[0];
Copy link
Contributor

@kilchenmann kilchenmann Mar 21, 2022

Choose a reason for hiding this comment

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

nice solution 👍

// console.log('parentResource: ', this.parentResource);
// console.log('linkType: ', linkType);
// console.log('restrictToResourceClass: ', this.restrictToResourceClass);
// console.log('resourceClasses: ', this.resourceClasses);
// console.log('ontoIri: ', this.ontoIri);
// console.log('propIri: ', this.propIri);
Copy link
Contributor

@kilchenmann kilchenmann Mar 21, 2022

Choose a reason for hiding this comment

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

can we remove these commented console logs?

Copy link
Collaborator Author

@mdelez mdelez Mar 21, 2022

Choose a reason for hiding this comment

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

removed all the console logs in a61671a 🙈

@kilchenmann
Copy link
Contributor

kilchenmann commented Mar 22, 2022

It works as expected. I've tested it with the freetest ontology from the anything project.
Just a small detail: it would be nice to highlight or separate the class label from "Create new". Maybe we can enclose the label in quotation marks or separate by column? e.g. Create New "Autor" or Create New: Autor
Screen Shot 2022-03-22 at 14 17 06

@mdelez
Copy link
Collaborator Author

mdelez commented Mar 22, 2022

It works as expected. I've tested it with the freetest ontology from the anything project. Just a small detail: it would be nice to highlight or separate the class label from "Create new". Maybe we can enclose the label in quotation marks or separate by column? e.g. Create New "Autor" or Create New: Autor

I added a colon in 0222dd1
Screen Shot 2022-03-22 at 14 35 02

@mdelez mdelez requested a review from kilchenmann Mar 22, 2022
@kilchenmann
Copy link
Contributor

kilchenmann commented Mar 22, 2022

Thank you!

@mdelez mdelez merged commit d0a260d into main Mar 22, 2022
13 checks passed
@mdelez mdelez deleted the wip/dev-553-new-entry-subclasses branch Mar 22, 2022
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