You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, Admin UI extensions must be Angular modules. This allows the modules to be compiled into the main Admin UI app, and allows re-use of components and sharing of core services e.g. the DataService or ModalService.
The problem is that a significant segment of JS devs do not know Angular. There will be plenty of React/Vue/Other devs who will want to create some UI extension but would be able to do it much more efficiently in their tech of choice.
Describe the solution you'd like
I would like to create a kind of host component which allows any arbitrary JS app to be used as an extension.
The basic idea would be that the user code is put in an iframe which is part of the host component. Communication is possible via an well-defined API which uses Window.postMessage API to pass data between the UI app and the user code.
Data layer
This API could even expose a GraphQL client which takes DocumentNodes and passes the stringified representation across the iframe boundary, at which point the UI app DataService makes the request, and then passes the response back to the user code. In this way the global Apollo cache can be leveraged and kept in sync.
Styling
A major downside to using a different tech is that it will not look consistent with the rest of the UI by default. This can be mitigated by providing a basic stylesheet which can be included in the user code.
Proof-of-concept
The first goal would be to allow the display of an arbitrary HTML document at a specified route in the UI app. Just use plain JS/HTML at this point
Next, provide a way to fetch data from the user app
Then provide some means of styling
Implement a simple CRUD view in React and Vue
Look into how we can expose some other services such as NotificationService (toast messages), ModalService etc. which would be commonly required, so the user apps can do these common UI tasks without needing to re-invent this common functionality.
Custom Field Controls
The other thing UI extension can do is to define custom controls for CustomFields. A similar approach as above could make it possible to author these custom controls in any technology.
The text was updated successfully, but these errors were encountered:
This package exposes an API which allows embedded UI extension applications to access core functionality. So far implements GraphQL queries & mutations. Relates to #225
Is your feature request related to a problem? Please describe.
Currently, Admin UI extensions must be Angular modules. This allows the modules to be compiled into the main Admin UI app, and allows re-use of components and sharing of core services e.g. the DataService or ModalService.
The problem is that a significant segment of JS devs do not know Angular. There will be plenty of React/Vue/Other devs who will want to create some UI extension but would be able to do it much more efficiently in their tech of choice.
Describe the solution you'd like
I would like to create a kind of host component which allows any arbitrary JS app to be used as an extension.
The basic idea would be that the user code is put in an iframe which is part of the host component. Communication is possible via an well-defined API which uses Window.postMessage API to pass data between the UI app and the user code.
Data layer
This API could even expose a GraphQL client which takes DocumentNodes and passes the stringified representation across the iframe boundary, at which point the UI app DataService makes the request, and then passes the response back to the user code. In this way the global Apollo cache can be leveraged and kept in sync.
Styling
A major downside to using a different tech is that it will not look consistent with the rest of the UI by default. This can be mitigated by providing a basic stylesheet which can be included in the user code.
Proof-of-concept
NotificationService
(toast messages),ModalService
etc. which would be commonly required, so the user apps can do these common UI tasks without needing to re-invent this common functionality.Custom Field Controls
The other thing UI extension can do is to define custom controls for CustomFields. A similar approach as above could make it possible to author these custom controls in any technology.
The text was updated successfully, but these errors were encountered: