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

Refactor how to get properties by type #88

Merged
merged 11 commits into from
May 27, 2020
Merged

Conversation

flavens
Copy link
Collaborator

@flavens flavens commented May 25, 2020

For more info: DSP-142 and DSP-275

@flavens flavens added the enhancement New feature or request label May 25, 2020
@flavens flavens self-assigned this May 25, 2020
@tobiasschweizer
Copy link
Contributor

As long as there isn't a new RC for the JS lib, it has to be built manually.
From the JS lib's project root:

  • npm run prepare-dev-publication (includes mock files)
  • npm run yalc-publish

@tobiasschweizer
Copy link
Contributor

tobiasschweizer commented May 26, 2020

@flavens Hopefully Non Breaking News: @knora/api@1.0.0-rc.1 is out!!!

@flavens flavens requested a review from tobiasschweizer May 26, 2020 11:58
Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

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

Please see my comments.

package.json Show resolved Hide resolved
@@ -1,8 +1,8 @@
<div class="resource-view" *ngIf="resource">

<!-- dsp-property-view -->
<div *ngIf="propArray.length !== 0; else noProperty">
<dsp-property-view [parentResource]="resource" [propArray]="propArray" [systemPropArray]="systemPropArray">
<div *ngIf="resPropInfoVals.length !== 0 || systemPropDefs.length !== 0; else noProperty">
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this check necessary? How would PropertyViewComponent behave if both resPropInfoVals and systemPropDefs are empty arrays?

You don't have to worry about not initialised members because bot arrays are initialised with an empty array. I think that's a good practice.

Copy link
Collaborator Author

@flavens flavens May 27, 2020

Choose a reason for hiding this comment

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

ok so I could remove this check but we should manage somehow the case where we get empty arrays, the user should know that there is no properties

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, fine with me if you leave this check.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean, the current way it is implemented is fine :-)

Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

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

Ok, looks good!

@flavens flavens merged commit a97ff8d into master May 27, 2020
@flavens flavens deleted the wip/DSP-142-getPropList branch May 27, 2020 09:02
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.

2 participants