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

Remove all use of non angular decorators #92

Closed
shlomiassaf opened this issue Apr 21, 2020 · 0 comments
Closed

Remove all use of non angular decorators #92

shlomiassaf opened this issue Apr 21, 2020 · 0 comments
Assignees
Labels
comp: core @pebula/ngrid (core package only, excluding secondary packages) comp: core-plugins @pebula/ngrid/* (All things related to core plugins the come as secondary package in @pebula/ngrid) comp: material @pebula/ngrid-material type: refactor
Milestone

Comments

@shlomiassaf
Copy link
Owner

shlomiassaf commented Apr 21, 2020

The codebase includes some use of custom decorators.

These are mainly used for declaration of things (@NgridPlugin) and observable handling (@UnRx)

These should be removed from the code completely because:

  1. It forces users to use the reflection polyfill (refelect-metadata or es6/reflect) which is no longer in use in AOT compilations

  2. It has limited support in some cases, especially UnRx.

For UnRx, see angular/angular#31495

It might be that the current implementation of UnRx is no longer supported when using ivy.
In addition, this approach, using decorators, will no longer be required in angular once Component Features is introduces to the public API.

Since the use is relatively limited, they should be removed from library code, left only in demo app code.

IMPLICATIONS

  • Removing @NgridPlugin is a breaking change in the rare case of someone developed a plugin...
    Since 2.0.0 is still in RC we can do that without bumping major.

  • Removing @UnRx means we can also remove the utils library (which is anyway being maintained by nform) and remove all reference to it. Any code there, used by the library, should move to the ngrid core package.

@shlomiassaf shlomiassaf self-assigned this Apr 21, 2020
@shlomiassaf shlomiassaf added comp: core @pebula/ngrid (core package only, excluding secondary packages) comp: core-plugins @pebula/ngrid/* (All things related to core plugins the come as secondary package in @pebula/ngrid) comp: material @pebula/ngrid-material comp: utils labels Apr 21, 2020
@shlomiassaf shlomiassaf added this to the 2.x.x milestone Apr 21, 2020
@shlomiassaf shlomiassaf modified the milestones: 2.x.x, 2.0.0 Apr 21, 2020
shlomiassaf added a commit that referenced this issue Apr 21, 2020
shlomiassaf added a commit that referenced this issue Apr 21, 2020
BREAKIN CHANGES:

If you created a custom plugin which required registration, registration is not longer suppoerted using decorators. Instead, register using the ngridPlugin method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core @pebula/ngrid (core package only, excluding secondary packages) comp: core-plugins @pebula/ngrid/* (All things related to core plugins the come as secondary package in @pebula/ngrid) comp: material @pebula/ngrid-material type: refactor
Projects
None yet
Development

No branches or pull requests

1 participant