ngx-metaui / rules Goto Github PK
View Code? Open in Web Editor NEWOne Framework to build a highly declarative and customizable UI without using templates.
License: Other
One Framework to build a highly declarative and customizable UI without using templates.
License: Other
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ X] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Develop new interactive application (tutorial) with a playground, where it can guide a developer thru the whole development process.
Playground let;s you play with the rules. For this we can use code mirror to create custom enviornment. It could be similar to: https://rxviz.com/examples/basic-interval
To support anybody who wants to use/play we need to create probably a slack channel representing this project
Based on the design document implement first phase of separation.
Here we need to endup with 2 libraris where we will have a core with metaui with ability to extend and second library with PrimeNG
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[X ] Other... Please describe: Desing document
Current metaUI relies heavily on PrimeNG that I started with. Event this works fine but it does not scale well so we need to have way how to make MetaUI rule engine agnostic from its UI layer.
MetUI Rule engine should be independed library and different UI frameworks should have a way how to easily extend and plug-in. This way any UI widget library can be used.
Therfore write a design document or some guidelines might be enough that will help us capture current and future state in order to share and comunicate the idea
Angular version: target Angular 7+
There is a document under the https://github.com/ngx-meta/rules/blob/master/packages/metaui/docs/architecture.md and it need somebody to look it over to see if it makes some sense
Plus /Readme.md
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Currently we need to know the type of the component which we use to instantiate and place it to the view, but the problem comes down with more complex component where instantiation would not help and its defined by its module. It imports different services , other modules, etc.
I expect that for more complex component we need to enable runtime module compilation and take component from there.
e.g.:
const module = await this.compiler.compileModuleAsync(ComboboxModule);
const cmdFactory = module.componentFactories[0];
console.log(module.componentFactories)
const component: ComponentRef<ComboboxComponent> = this.vc.createComponent(cmdFactory);
component.instance.dataSource = this.dataSource;
component.instance.name = 'standard2';
component.instance.placeholder = 'standard2 placeholder';
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
Currently we follow angular's structure which is not really compatible with CLI as keeping Libraries and Application in separate folder requires output dir change (newProjectRoot
) in angular.json.
There is idea to support nwrl.io and theri schematics utilities
Let's keep in mind that we need to support core, components, metaui and resources for now. The existing packages so we have still something working and slowly transition to the state where is there is only metaui.
The idea is to have pluginable UI layer (existing primeNG and Material and others) that would hook into metaUI during a runtime.
I will write up something how metaui could be detached from actually libraires but need little help with good directly structure.
In order to stay connected, let's create our metaui comunication channel
Implement another UI layer with Material 2 to showcase how to implenent and plug-in new UI layer
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[X] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
When I click on the link, youtube says the video is not available since it's private
I'm able to watch the video
Publish a demo that we have on our orig version that shows how and why metaui the:
probably the /modules/metaui-evolution/.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Now its too complicated as it cannot use all the features of standard version and the only thing it does is to build the package before.
Script scripts/release.sh
currently recognizes only a few arguments.
Remove all this and pass ("$@")
directly to the ./node_modules/.bin/standard-version
call
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Currently we are running againts old version of fundamentals and to be able to move this UI development to actual fundamentals library so it can be part of it.
[x ] Bug report
[x] Documentation issue or request
When you add metaui to existing project using ng-add
there is a Dummy.oss file created. which is confusing.
This file is need to be able to compile project as ApplicationModules imports user-rules.ts
. Without Dummy.oss this file is empty.
Remove Js comments from generated Domain classes
Let's improve it a bit. Each application needs also 1 common rule file with application scope called Application.oss
. Will rename dummy.oss to this file instead. When rules are added it will have default app rule file to start with, where you can start defining global rules ('custom layouts', landing page structure, global actions, etc.. )
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ X] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Currently when I define different layout per operation and try to distribute fields differently for each operation MetaFormTable does not refresh correctly
e.g.: When having 2 column layout in VIEW mode and switching into 1 column layout EDIT and then go back to View the view it does not maintain original 2 columns
The problem is probably with FormTableComponent as I migrated from to higher version of angular adn removed cyclic dependencies and probably broke this. The Rule Engine Correctly outputs right information it just the component
When switching between each operation it will maintain original state.
Angular version: 7
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current even rules are loaded dynamically and rules engine is able to process runtime rules, there is no user friend method exposed so it can be used on the application level.
<!
[ X] Bug report
[X ] Documentation issue or request
Remove unnessesary option from the ng-add schematics npmInstall
as not everybody uses npm and some use yarn. This way it might confuse developers.
Hi @fkolar,
thanks for the awesome talk you gave in Munich.
I struggle a bit getting MetaUI to work in my current project.
Maybe you or one of your team mates can help out.
Thanks in advance
Gregor
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
java --version
java 12.0.1 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
ng --version
Angular CLI: 8.1.1
Node: 10.15.3
OS: darwin x64
Angular: 8.1.1
npm run compile:oss
throws JDK
errorsnpm run compile:oss
throws JDK
should workng new metaui-playground --style=scss
ng add @ngx-metaui/rules --uiLib=material2
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (jar:file:/Users/gregor/workbench/scratch/angular/meta-ui-playground/node_modules/@ngx-metaui/rules/lib/resources/tools/oss/meta-ui-parser.jar!/BOOT-INF/lib/groovy-2.4.7.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-07-16 09:24:45.337 ERROR 82921 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at ariba.Application.main(Application.java:33) ~[classes!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[meta-ui-parser.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[meta-ui-parser.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[meta-ui-parser.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) ~[meta-ui-parser.jar:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1214) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1054) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
... 24 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:129) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:96) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:31) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276) ~[validation-api-1.1.0.Final.jar!/:na]
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:248) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor$LocalValidatorFactory.run(ConfigurationPropertiesBindingPostProcessor.java:452) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.getValidator(ConfigurationPropertiesBindingPostProcessor.java:386) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.determineValidator(ConfigurationPropertiesBindingPostProcessor.java:369) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:331) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:302) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[na:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:89) ~[meta-ui-parser.jar:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
... 48 common frames omitted
error Command failed with exit code 1.
[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see
There is a Circular dependency between several classes and it needs better separation
Meta - Context, ObjectMeta-ObjectContext, UIMeta-UIContext needs to be nicely separated and all the common method calls extracted out to either a abstract class or Interface that can be passed around.
This can wait once we separate Meta from UI layer
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Right now it cannot work with Ivy
due the the way I instantiate Input-like components. Since I want to use two way bindings programatically adn connect these FORM based components with form API ngModel
:
type=(Number) {
editable {
component:InputComponent;
canSetType:true;
bindings:{
ngModel: $value;
};
}
}
I am instantiating manually NgModel
and attaching it to the _view
. This is more hackie way but it works and its like I would do:
<fdp-input [(ngModel)]="value">
</fdp-input>
With Ivy
we need to do this a bit differently to fill in the gap where we still cannot add a directive to instantiated component.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Here we can get some better performance boost. Everytime you switch between editable mode to readonly mode, I call clear on current ViewContainerRef, where all the components are destroyed and when I get back they are re-creating.
I think we can do better here and instead of calling .clear()
we can call detach
and cache current View.
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
We need to move this project under ngx-metaui as we will not own ngx-meta. It is also confusing as we publish libraries under ngx-metaui but github project is under something else.
Move rules + create extra readme.md place holder to redirect user to the new repository
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
When you want run application and you define your rules you need to always run offline compiler that takes OSS and transform it into JS literal object so it can be read by rule engine. this is not really DX friendly as we cannot make any dynamic updates.
As part of the OSS next stage
where we need to be able to registr rules on the fly from the backend server there needs to be compiler written in JS
Implement JS compiler that is able to process BNF grammer and read current rules. Once we have this it will allow us to also have Decorators.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
I'm not able to see the edit or create UIs, just the view UI. I followed theses steps:
ng new MyDetailPage --style=scss
cd MyDetailPage/
ng add @ngx-metaui/rules
ng g @ngx-metaui/rules:mPage --modelClass=User --name=UserDetail
npm run compile:oss
<app-user-detail></app-user-detail>
ng serve
Compilation works and I can see the Form in the view UI, but when I click on the edit or create view then the UI will be empty (besides the view, edit & create button) and I get the following error in the console:
core.js:5873 ERROR TypeError: Cannot read property 'disposables' of undefined
at MetaIncludeDirective.applyNgModel (ngx-metaui-rules.js:13848)
at MetaIncludeDirective.applyInputs (ngx-metaui-rules.js:13779)
at MetaIncludeDirective.applyBindings (ngx-metaui-rules.js:13705)
at MetaIncludeDirective.doRenderComponent (ngx-metaui-rules.js:12909)
at MetaIncludeDirective.ngOnInit (ngx-metaui-rules.js:12844)
at callHook (core.js:3937)
at callHooks (core.js:3901)
at executeInitAndCheckHooks (core.js:3842)
at refreshView (core.js:11795)
at refreshDynamicEmbeddedViews (core.js:13142)
See the edit/create UI
See at Current behavior
Just learning
Angular version: X.Y.Z
Browser:
- [x] Chrome (desktop) version 80.0.3987.122
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: v10.17.0
- Platform: Mac version 10.15.3
Others:
We can use similar way how material2 does it.
https://blog.angular.io/angular-schematics-unit-testing-3a0a9aaab186
https://github.com/angular/material2/tree/master/src/lib/schematics
Setup TRAVIS CI for this new project to make sure all the check-in are validated along with other tasks:
What is the good practice now? I see projects to be compatible with NG they kind of follow the same 6.1.x version and some ignore this and make their own 0.x.x
Which one to pick?
Let's put together nessesary documents for this and put them in the repo.
We can use the same what Angular or Material have.
What about git repo iteself? I see on some project when you try to checkin it there is a additional steps which is forcing you to agree with the contribution license.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Make it ready to NG8 and AVY. Since MetaUI is using allot of programatic API as well as some private API, make sure the NG8 and IVY does not break anything.
such as accesing a view that is using a angular template:
(<any>this._viewContainer.injector).view.context;
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
When you run schematics ng g ...rules:mPage
it adds incorrect export to the user-rules.ts. There is hardcoded value UserRules
instead of having correct name that I specify on the command line.
Export record for the modelClass will match to name I specify on the command line.
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
[X] Performance issue
[X] Feature request
In current version we follow standard way of instantiating component and adding it to the view container. But there is still a problem where :
entryComponents
We should be able to replace existing functionality with dynamic imports in such way::
const component: InstanceType<any> = await import('./quiz-card/quiz-card.component');
const quizCardFactory = this.cfr.resolveComponentFactory(component['QuizCardComponent']);
const {instance} = this.quizContainer.createComponent(quizCardFactory, null, this.injector);
And the OSS rule file where we set what component should be used we can just add additional propery to specify a import path. This way the whole instantiation can work lazily.
Hi @fkolar,
we recently discussed how to use a builder to run OSS compilation.
Maybe we can do it simpler with a custom webpack configuration.
I have seen this in a project that allows the use of PUG-templates in Angular CLI: https://github.com/danguilherme/ng-cli-pug-loader
I do not know what impact this could have on i18n.
That's why I am not sure if this is a proper solution.
Currently, all rules are collected in one rules
-folder.
The main reason for that is that the file user-rules.ts
collects all rules and is referenced in app.module.ts
.
In terms of discoverability it would be nice to be able placing rules as near to the entity as possible.
star-wars/
┣ model/
┃ ┣ character.ts
┃ ┣ character.rule.oss
┃ ┣ character.rule.oss.ts
┃ ┗ lightsaber-color.ts
┣ star-wars-routing.module.ts
┣ star-wars.component.ts
┗ star-wars.module.ts
To be able to do this it would be needed to simplify registering rules in metaUI.
// app.module.ts
import * as app from './rules/app-rules';
// ...
imports: [
MetaUIModule.forRoot({
rules: {
appRules
}
})
]
// star-wars.module.ts
import * as characterRules from './rules/user-rules';
// ...
imports: [
MetaUIModule.registerRules({
characterRules
})
]
In app.module.ts
a name is set for the rule: 'metaui.rules.user-rules'
For what is this name needed?
const rules: any[] = config.get('metaui.rules.user-rules') || [];
rules.push(userRules);
config.set('metaui.rules.user-rules', rules);
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
The naming of Entity
members do not follow a common convention.
It should be easy to identify members coming form Entity
.
interface Entity {
identity(): string;
className(): string;
getTypes(): any;
}
Having an easy-to-follow naming structure.
interface Entity {
entityIdentifier(): string; // before: identity
entityName(): string; // before: className
entityTypes(): any; // before: getTypes
}
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[X] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Currently some parts of code are relaying on this 3th-party lib to utilize its Dictionary implementation and there is a less a needs for it as it can be replaced by TS Maps with specific custom key implementation.
Its a overhead that code needs to work with.
Replace all the occurences of Typescript-collections with native TS Maps. Mostly it's inside Context.ts
, where we are using it to cache activation.
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
To better understand how rules are computed we need to implement a Component Inspector that helps us introspect current page and its content.
Component Inspector should have 3 different views:
Meta Properties
Effect properties and their final computed values.
Assignments
Shows rules that are applicable in the current context. For each rule we show - the selectors and property map
Context
Shows context stack at the point of the current element.
Enable MatButton to be renderable inside FormField. Its common usecase when you show your form in read-only (view) mode where one of the complex field value can be wrap with a buton or anchor to take to the object detail page.
e.g.: In editable mode you might want to render a select or autocomple and when you switch to read-only mode you might want to just render some text wrapped with anchor that actives some routing functionality.
Todo this FormField needs to be flexible in what goes in. Just like we had to wrap select or radio buttons that did not implement MatFormControl the same needs to be done with a button.
Button components needs to be programatically instantiable !
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Currently MetaUI relies on the Runtime i18n (something similar to ngx-translate
used to work) and have specific syntax to mark strings inside OSS to be translatable.
Extend Builder API to include also the also OSS files. This is for "extract strings to files" and "Compile" process
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.