Action API Migration Tracking
The current Action API has known issues with XML processing, including the loss of XML prologs (see #1163). As we transition to the new API, we need to keep track of which plugins are still using the old Action API to ensure a complete migration.
Goal
- Track migration progress
- Identify potential dependencies between plugins
- Ensure no plugins are overlooked during the transition
AC
- [x] Create a list of plugins that currently use the old API.
Some parts of the codebase have already been marked as deprecated and separated from the rest of the working code, e.g. core/foundation has been moved to core/deprecated/foundation. However, important functions such as newActionEvent and newActionEvent are still imported and used from the deprecated folder.
Assessment
Lists are not sorted.
| Plugin | Important components/folders involved |
|---|---|
| SLD | packages/plugins/src/editors/SingleLineDiagram.ts |
| Communication | packages/plugins/src/editors/communication/Communication.ts |
| Templates | packages/plugins/src/editors/templates/Templates.ts |
| IED | packages/plugins/src/editors/ied/ied-container.ts |
| Substation | packages/plugins/src/editors/substation/substation-editor.ts |
| Menu Entries and other components | Important components/folders involved |
|---|---|
| VirtualTemplateIED.ts | packages/plugins/src/menu/VirtualTemplateIED.ts |
| control-blocks-container.ts | packages/plugins/src/editors/cleanup/control-blocks-container.ts |
| datasets-container.ts | packages/plugins/src/editors/cleanup/datasets-container.ts |
| datatypes-container.ts | packages/plugins/src/editors/cleanup/datatypes-container.ts |
| connectedap-editor.ts | packages/plugins/src/editors/communication/connectedap-editor.ts |
| gse-editor.ts | packages/plugins/src/editors/communication/gse-editor.ts |
| smv-editor.ts | packages/plugins/src/editors/communication/smv-editor.ts |
| subnetwork-editor.ts | packages/plugins/src/editors/communication/subnetwork-editor.ts |
| connectedap-editor.ts | packages/plugins/src/editors/protocol104/connectedap-editor.ts |
| network-container.ts | packages/plugins/src/editors/protocol104/network-container.ts |
| tests | integration/* unit/* |
Further research and replacement with a new technology
The above lists only highlight the most important files in each plugin represented, the full list includes 55 entries with some kind of relationship to the deprecated API usage.
Search API usage
Look for these patterns in plugin code:
- Imports or usage of
newActionEvent - Event dispatches containing
actionsarrays - Document manipulation using
document.implementation.createDocument(ExportCommunications.ts) - Patterns similar to:
this.dispatchEvent(
newActionEvent({
new: {
parent: this.doc.documentElement,
element: element,
},
}));
There more editors and wizards using the editor action api
| Component | Location |
|---|---|
| Wizard Dialog | packages/openscd/src/wizard-dialog.ts |
| Voltage level editor | /packages/plugins/src/editors/substation/voltage-level-editor.ts |
| ... |
There are about 50 files, do we want to list all of them?
We are willing to wait that the plugins are migrated out of the openscd package before addressing this point.