Repository navigation
[Epic] different and well defined extension points of phoenix #2573
Description
Goal
This shall be an explicit list of well defined extension points for phoenix and related system.
Each extension point will be properly and explicitly documented in here
Assumptions
Each app is implemented as it's own single page application and is reachable on the same domain in a subfolder (alternative might be to use sub domains - needs clarifications)
Application Menu
Every Phoenix application will provide an application menu which will list applications the user can switch to. Any new app shall be opened in it's own tab.
The configuration of the application menu will be loaded from an backend url (static file or served by a service). The configuration will be a list of menu items with these attributes:
- icon: a path to an icon - hosted by the backend
- uri: an url which points to the application - will be opened in a new tab
- title: the name of the app which is displayed in the menu. This can either be a simple string or a map of language code to the translated application name
Example
{
"applications": [
{
"icon": "/files/files.svg",
"url": "/files",
"title": {
"en": "Files",
"de": "Dateien"
}
},
{
"icon": "/documents/office.svg",
"url": "/documents",
"title": "Awesome Office™"
}
]
}Files: Adding file actions
The Phoenix files app can be extended to add file actions for various file types to allow opening a file in a specific application. Basically a give url will be opened in a tab on it's own and information about the file will be passed in the url. A list of url placeholders will be defined ...
The configuration of file actions is a list of file action elements with these attributes:
- icon: an icon to be displayed on the file action menu - shall be an svg - further criteria to be defined (like the ability to set the color from outside)
- url: the url to be called with placeholder which are going to be replaced by the files app
- title: like in the application menu either simple string or a map of language to the translated name
- fileExtensions: a list of file extensions which the application can handle
Example
"filesActions": [
{
"icon": "/documents/office.svg",
"url": "/documents/edit/{PATH}",
"title": {
"en": "Edit in Awesome Office™",
"de": "Mit Awesome Office™ bearbeiten"
},
"fileExtensions": [
"docx",
"ods"
]
}
]
Files: Sidebar Integration
Any app shall be capable to inject itself into the sidebar and be allowed to display information related to the currently selected file (any maybe load additional information for the current file) and to manipulate.
At the end we need a configuration entry here as well holding information about these attributes:
- title: title in the sidebar tab - shall be translated
- componentUrl: the location from where to load the component (CSP and CORS need to be properly setup on the hosting domain)
- componentName: name of the component being the tag name
Example
"files": {
"sidebars": [
{
"title": {
"en": "Webkomponenten-Demo I",
"de": "Web Component Demo I"
},
"componentName": "my-custom-element",
"componentUrl": "external/dist/my-custom-element.js"
},
Activity
DeepDiver1975 commentedon Nov 27, 2019
Prototype is in #2584
DeepDiver1975 commentedon Nov 27, 2019
or file extensions - this is what phoenix uses as of today
[-][Vision/Proposal] different and well defined extension points of phoenix[/-][+][Epic] different and well defined extension points of phoenix[/+]PVince81 commentedon Dec 9, 2019
Next up:
PVince81 commentedon Dec 11, 2019
DeepDiver1975 commentedon Dec 18, 2019
there is no file format which can be used out of the box - https://docs.transifex.com/formats/introduction
We can either build something (export/import & convert to one of the supported formats) or we maintain the individual translations directly in git in the sample or dist config file.
LukasHirt commentedon Jan 31, 2020
Thinking now about another extension point. Fire up events when uploading a resource (on start and on end) and expose it so extensions can react to that. Any thoughts on this?
DeepDiver1975 commentedon Apr 23, 2020
implemented as far as I can tell -> close