Skip to content

[NAE-1892] Validation register #202

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

Open
wants to merge 13 commits into
base: release/6.4.0
Choose a base branch
from
Open

[NAE-1892] Validation register #202

wants to merge 13 commits into from

Conversation

renczesstefan
Copy link
Member

@renczesstefan renczesstefan commented Jun 2, 2023

Description

Implemented validation register.

Implements NAE-1892

Dependencies

No new dependencies were introduced.

Third party dependencies

No new dependencies were introduced.

Blocking Pull requests

Depends on #198 - PR 198 must be merged before this.

How Has Been This Tested?

This was tested manually and with unit tests.

Test Configuration

Netgrif Frontend PR Config

Name Tested on
OS macOS Ventura 13.1
Runtime Node 14.19.3
Dependency Manager NPM 6.14.17
Framework version Angular 13.3.1
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @mazarijuraj
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

- implemented register for validations
# Conflicts:
#	docs/compodoc/components/js/search/search_index.js
#	docs/typedoc/components-core/modules.html
#	projects/nae-example-app/src/app/app.module.ts
#	projects/netgrif-components-core/src/lib/data-fields/boolean-field/models/boolean-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-field/models/date-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-time-field/models/date-time-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/number-field/abstract-number-errors.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/number-field/currency-number-field/abstract-currency-number-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/number-field/number-default-field/abstract-default-number-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/abstract-dashboard-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/abstract-text-errors.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/dashboard-bar-chart-text-field/abstract-dashboard-bar-chart-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/dashboard-iframe-text-field/abstract-dashboard-iframe-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/dashboard-line-chart-text-field/abstract-dashboard-line-chart-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/dashboard-pie-chart-text-field/abstract-dashboard-pie-chart-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/dashboard-portal-text-field/abstract-dashboard-portal-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/html-textarea-field/abstract-html-textarea-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/password-text-field/abstract-password-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/rich-textarea-field/abstract-rich-textarea-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/simple-text-field/abstract-simple-text-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/textarea-field/abstract-textarea-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/time-instance-abstract-field/abstract-time-instance-field.component.ts
#	projects/netgrif-components-core/src/public-api.ts
- implemented register for validations
- implemented validation interface
- refactored abstract data field components
@renczesstefan renczesstefan added breaking change Fix or feature that would cause existing functionality doesn't work as expected new feature Extra Large labels Jun 2, 2023
@renczesstefan renczesstefan self-assigned this Jun 2, 2023
- modified components and translation
# Conflicts:
#	projects/netgrif-components-core/src/lib/data-fields/boolean-field/models/boolean-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/models/abstract-data-field.ts
#	projects/netgrif-components/src/lib/data-fields/data-fields.module.ts
#	projects/netgrif-components/src/lib/data-fields/date-field/date-default-field/date-default-field.component.ts
#	projects/netgrif-components/src/lib/data-fields/date-time-field/date-time-default-field/date-time-default-field.component.ts
# Conflicts:
#	docs/compodoc/components/js/search/search_index.js
#	docs/typedoc/components-core/modules.html
@pull-request-quantifier-deprecated

This PR has 7277 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Large
Size       : +4611 -2666
Percentile : 100%

Total files changed: 289

Change summary by file extension:
.html : +406 -534
.ts : +4065 -1999
.json : +17 -14
.scss : +123 -119

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 4 Security Hotspots
Code Smell A 100 Code Smells

40.2% 40.2% Coverage
1.4% 1.4% Duplication

Copy link

dpulls bot commented Feb 9, 2024

🎉 All dependencies have been resolved !

# Conflicts:
#	projects/nae-example-app/src/app/app.module.ts
#	projects/netgrif-components-core/src/lib/data-fields/base-component/abstract-base-data-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/boolean-field/models/boolean-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/data-fields.module.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-field/abstract-date-field.component.spec.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-field/date-default-field/abstract-date-default-field.component.spec.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-field/date-default-field/abstract-date-default-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-time-field/abstract-date-time-field.component.spec.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-time-field/date-time-default-field/abstract-date-time-default-field.component.spec.ts
#	projects/netgrif-components-core/src/lib/data-fields/date-time-field/date-time-default-field/abstract-date-time-default-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/models/abstract-data-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/text-field/abstract-text-errors.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/time-instance-abstract-field/abstract-time-instance-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/time-instance-abstract-field/models/abstract-time-instance-field.ts
#	projects/netgrif-components-core/src/lib/data-fields/user-field/user-default-field/abstract-user-default-field.component.ts
#	projects/netgrif-components-core/src/lib/registry/public-api.ts
#	projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts
#	projects/netgrif-components-core/src/lib/task-content/services/task-content.service.ts
#	projects/netgrif-components/src/lib/data-fields/data-fields.module.ts
#	projects/netgrif-components/src/lib/data-fields/date-field/date-default-field/date-default-field.component.ts
#	projects/netgrif-components/src/lib/data-fields/date-time-field/date-time-default-field/date-time-default-field.component.ts

This PR has 1733 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Large
Size       : +1082 -651
Percentile : 100%

Total files changed: 120

Change summary by file extension:
.ts : +1065 -637
.json : +17 -14

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

1 similar comment

This PR has 1733 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Large
Size       : +1082 -651
Percentile : 100%

Total files changed: 120

Change summary by file extension:
.ts : +1065 -637
.json : +17 -14

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

# Conflicts:
#	projects/nae-example-app/src/app/app.module.ts
#	projects/netgrif-components-core/src/lib/data-fields/i18n-field/i18n-text-field/abstract-i18n-text-field.component.ts

This PR has 1736 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Large
Size       : +1084 -652
Percentile : 100%

Total files changed: 120

Change summary by file extension:
.ts : +1067 -638
.json : +17 -14

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

Copy link

# Conflicts:
#	projects/netgrif-components-core/src/lib/data-fields/case-ref-field/case-ref-default/case-ref-default.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/enumeration-field/enumeration-caseref-field/abstract-enumeration-caseref-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/file-field/file-default-field/abstract-file-default-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/file-list-field/file-list-default-field/abstract-file-list-default-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/multichoice-field/multichoice-caseref-field/abstract-multichoice-caseref-field.component.ts
#	projects/netgrif-components-core/src/lib/data-fields/string-collection-field/string-collection-default-field/abstract-string-collection-default-field.component.ts
#	projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts
#	projects/netgrif-components/src/lib/data-fields/data-fields.module.ts
- updated according to PR
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Fix or feature that would cause existing functionality doesn't work as expected Extra Large new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant