-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: wizarding #127
base: main
Are you sure you want to change the base?
feat: wizarding #127
Changes from 5 commits
90493e2
4ed471e
e71b528
a0b6038
3240098
6dd42d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,227 @@ | ||||||||||||||||||||||||||
# Wizarding API | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Date: 2023-07 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Status | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Accepted | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Context | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Often plugins need a way to display, edit and create SCD elements. | ||||||||||||||||||||||||||
We want to avoid to put too much effort into implementing the same thing over and over again. | ||||||||||||||||||||||||||
Also we want to speed up plugin development by extracting some common functionalities out of the plugins. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Decision | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
We will create a new plugin type, wizard, and provide a wizarding API that enables the followings: | ||||||||||||||||||||||||||
- Editor plugins can call wizards to display, edit or create specific SCD elements | ||||||||||||||||||||||||||
- We can provide wizard plugins for specific SCD elements | ||||||||||||||||||||||||||
- In case there are no wizard plugins installed we will have a simple, generic one | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### API Specification | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
In this section we define the lifecycle of a wizard plugin and describe each step. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
#### Structure | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```txt | ||||||||||||||||||||||||||
┌──────────────────────────────────┐ | ||||||||||||||||||||||||||
│Core │ | ||||||||||||||||||||||||||
│ ┌─────────────┐┌─────────────┐ │ | ||||||||||||||||||||||||||
│ │Editor Plugin││Wizard Plugin│ │ | ||||||||||||||||||||||||||
│ └─────────────┘└─────────────┘ │ | ||||||||||||||||||||||||||
└──────────────────────────────────┘ | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
We separate editors and wizards so that wizards can be used by other editors. | ||||||||||||||||||||||||||
This, of course, could create a coupling between plugins, so a default or | ||||||||||||||||||||||||||
fallback wizard is necessary to handle all elements e.g.: a generic XML editor | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
#### Lifecycle | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```txt | ||||||||||||||||||||||||||
┌─────────────────┐ ┌───────────┐┌─────────────────┐ ┃ | ||||||||||||||||||||||||||
│ Editor Plugin │ │ Core ││ Wizard Plugin │ ┃ LEGEND | ||||||||||||||||||||||||||
└─────────────────┘ └───────────┘└─────────────────┘ ┃ ┌───────────┐ | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does "Editor Plugin" in this case include a menu plugin? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, I was just focusing on the the "editor vs wizard" aspect :) |
||||||||||||||||||||||||||
│ │ │ ┃ │ <name> │ module with lifeline | ||||||||||||||||||||||||||
│ │ │ ┃ └─────┬─────┘ | ||||||||||||||||||||||||||
│ │◀───register───│ ┃ │ | ||||||||||||||||||||||||||
│───register────▶│ │ ┃ │ | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do these plugins register themselves? Is this a new type of communication from the plugin to open-scd-core? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no nothing new, just by defining them in the array as right now |
||||||||||||||||||||||||||
│ │ │ ┃ │ | ||||||||||||||||||||||||||
│ requests a │ │ ┃ │ | ||||||||||||||||||||||||||
│───wizard for──▶│ │ ┃ | ||||||||||||||||||||||||||
│ a given │ asks wizard │ ┃ | ||||||||||||||||||||||||||
│ │───if it can ─▶│ ┃ ──<desc.> ─▶ Initiated action | ||||||||||||||||||||||||||
│ │ handle given │ ┃ | ||||||||||||||||||||||||||
│ │ │ ┃ | ||||||||||||||||||||||||||
│ │◀ ─ ─answer ─ ─│ ┃ ─ <answer> ▶ Answer to an action | ||||||||||||||||||||||||||
│ │ │ ┃ | ||||||||||||||||||||||||||
│ │ initiates │ ┃ | ||||||||||||||||||||||||||
│ │ wizard │ ┃ ┌─┐ | ||||||||||||||||||||||||||
│ │───with the ──▶│ ┃ │ │ | ||||||||||||||||||||||||||
│ │ given ┌┴┐ ┃ │ │ | ||||||||||||||||||||||||||
│ │ element │ │ ┃ │ │ Internal process | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens when there is still a wizard being displayed while the request comes in? Currently, we push the incoming wizard to the front or back end of the wizard deque (currently called "workflow") depending on whether it's invoked as a subwizard or not. How does this proposal address the common case of a wizard requesting another wizard? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be out of scope, I would say. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we delay the decision, would wizard plugins written before we make the decision stop working once we have made it? Is there any way we could grow into this thing in a backwards compatible fashion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is necessary to keep this in mind, but my initial feeling is that we can solve this in a compatible way |
||||||||||||||||||||||||||
│ │ │ │wizarding ┃ │ │ | ||||||||||||||||||||||||||
│ │ │ │process ┃ │ │ | ||||||||||||||||||||||||||
│ │ │ │ ┃ └─┘ | ||||||||||||||||||||||||||
│ │ │ │ ┃ | ||||||||||||||||||||||||||
│ │ └┬┘ ┃ | ||||||||||||||||||||||||||
│ │ ├──┐ ┃ | ||||||||||||||||||||||||||
│ │ │ │ ┃ | ||||||||||||||||||||||||||
│ │ closes ┃ | ||||||||||||||||||||||||||
│ │ itself ┃ | ||||||||||||||||||||||||||
│ │ │ │ ┃ | ||||||||||||||||||||||||||
│ │ ◀──┘ ┃ | ||||||||||||||||||||||||||
│ │ │ ┃ | ||||||||||||||||||||||||||
X X X ┃ | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For invoking the next wizard on the deque (in order to know when to render a wizard plugin at all, and to move on to the next wizard) and for deciding when to stop rendering the wizard selector button (which will be needed to achieve feature parity with the current legacy open-scd implementation) we will need to know when the wizard is done with its work. An event that says "I'm done" would likely be needed here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would you prefer an event after the closure or an event that asks the core to close the wizard? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a preference, but it's a decision I would really want us to think about the consequences of. Whether any wizards ever could need any cleanup, or whether "well, you're not being rendered any more now!" is always going to be acceptable as a way for core to close wizards. In the latter case I think I'd prefer that since it's simpler and doesn't require for the wizard itself to do any opening or closing, just to always render its stuff. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree and I have already made changes |
||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Registration | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Registering a wizard plugin happens the same way as registering another plugin. | ||||||||||||||||||||||||||
We will add the wizard type to our `PluginSet`. | ||||||||||||||||||||||||||
```diff | ||||||||||||||||||||||||||
- export type PluginSet = { menu: Plugin[]; editor: Plugin[] }; | ||||||||||||||||||||||||||
+ export type PluginSet = { menu: Plugin[]; editor: Plugin[], wizard: Plugin[] }; | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Wizards must have two public static functions called `CanInspect` and `CanCreate`. | ||||||||||||||||||||||||||
`Core` will call these functions when it tries to figure out which wizard supports | ||||||||||||||||||||||||||
the given element and action. | ||||||||||||||||||||||||||
```ts | ||||||||||||||||||||||||||
type CanInspect: (tagName: string) => boolean | ||||||||||||||||||||||||||
type CanCreate: (tagName: string) => boolean | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not name these "Edit" and "Create", respectively? Also, isn't a name that starts with a lowercase letter more usual for methods?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yes, I have not mentioned much about the naming. These are the type definitions so capital letter but I usually capitalise static stuff but I don't insist on it (But the types I would keep capitalised ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see the "type" keyword in those lines. In general I wouldn't define named types for those, but wherever we do define named types, let's definitely capitalise them, since that's the TS and JS convention. Currently in open-scd, we don't capitalise any static fields, the same way open-wc, lit, and mwc do: They have all properties and methods start with lowercase regardless of whether they're defined on the class or on the instance, just like all constants and functions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have tried to make the description clearer and already changed them to lowercase. |
||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Requests | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
We request a wizard through events. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
For viewing and/or editing purposes we can request an inspection. | ||||||||||||||||||||||||||
The event is called `oscd-wizard-inspection-request` and its details look like this: | ||||||||||||||||||||||||||
```ts | ||||||||||||||||||||||||||
type WizardInspectionRequest = WizardRequest & { | ||||||||||||||||||||||||||
element: Element, | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The other possible request is to create a new element under a parent element. | ||||||||||||||||||||||||||
The event is called `oscd-wizard-creation-request` and its details look like this | ||||||||||||||||||||||||||
```ts | ||||||||||||||||||||||||||
type WizardCreationRequest = WizardRequest & { | ||||||||||||||||||||||||||
parent: Element, | ||||||||||||||||||||||||||
tagName?: string, | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Both event detail can contain an additional `stuff` for flexibility. `stuff` can be something | ||||||||||||||||||||||||||
that the wizard defines for additional configurations (e.g.: display it in readonly mode), | ||||||||||||||||||||||||||
or the editor can provide additional information about the element. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
> **⚠️ WARNING:** Please only use `stuff` if there is no other way. | ||||||||||||||||||||||||||
> It creates a tight coupling with a specific wizard or editor and it cannot be | ||||||||||||||||||||||||||
> guaranteed that your expectation about the `stuff` will be met! | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to introduce an extra background hatch to the event that comes with a warning not to use it? What use case are we solving by this? "for flexibility" sounds scarily vague to me. The current problems with the original wizard API came about exactly because we designed it "for flexibility". The proposal in the Wizard API issue from last year's April was exactly to make the event a pure declaration of intent to edit or create a particular element. For what purpose do we need something other than that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh missing example from my part sorry stuff:{
readonly: true
} However, I like the idea to leave it out and figure out a solution when we get a problem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would generally suggest that whether something should be editable or not should be up to the distribution. So for example, my distribution might include a wizard library that gets information about the current stage of the engineering process from the file and information about the user role from, say, an OpenID connect provider, and then shows read-only wizards for those elements which can not be edited by a user with this role at this stage of the engineering process. So if we want e.g. read only views in general, let's include a read only wizard library. This would mesh well with the declaration of user intent "I want to edit/create this element" that was the idea behind the API. Do we believe "I want to view this element but I would be really angry if I could also edit it, so please don't allow me to do that!" to be a separate possible user intent? I currently don't see the use case for that, but if we do, I think it would be prudent to introduce a third type of wizard request just for viewing. What do you think about all this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you are right. This is more like a UX problem maybe and we have to decide on a case-by-case basis. |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```ts | ||||||||||||||||||||||||||
type WizardRequest = { | ||||||||||||||||||||||||||
stuff?: unknown | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
> **ℹ️ INFO:** you can find the up-to-date definitions here: TODO: file link | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
> **ℹ️ INFO**: More about other alternatives of requests: | ||||||||||||||||||||||||||
> [Alternatives for Requests](#alternatives-of-requests) | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Finding Available Wizards | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
When `Core` receives one of the above mentioned events it will go and ask the | ||||||||||||||||||||||||||
wizards if they can handle the element and action. | ||||||||||||||||||||||||||
It will call: | ||||||||||||||||||||||||||
- `CanInspect` if the event is `oscd-wizard-inspection-request` | ||||||||||||||||||||||||||
- `CanCreate` if the event is `oscd-wizard-creation-request`. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Initiation | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
In case of inspection the wizard would get the element. | ||||||||||||||||||||||||||
```html | ||||||||||||||||||||||||||
<oscd-wizard-type-templates .element={element} .stuff={stuff}></oscd-wizard-type-templates> | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
If we want to create a new element it will get the parent element and the new tag name it has to create. Something like this: | ||||||||||||||||||||||||||
```html | ||||||||||||||||||||||||||
<oscd-wizard-type-templates .parentElement={parentElement} tag-name="DO" .stuff={stuff}></oscd-wizard-type-templates> | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Wizarding Process | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
This part happens entirely in the wizard plugin. | ||||||||||||||||||||||||||
It can modify the XML document or just display it in some user-friendly way. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
##### Self Closing | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The wizard decides when it is finished and closes itself. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
`Core` has always the possibility to close the wizard. | ||||||||||||||||||||||||||
For example when clicking on the backdrop of a dialog. | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As commented above, we'd likely need some API to let core know when the wizard has done its work. |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Considered Options | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### Define handled tag names in the plugin configuration | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
An alternative to the `CanHandle` static function is to define the | ||||||||||||||||||||||||||
tag names in the plugin description e.g: in a string array called `handledTags`. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
```ts | ||||||||||||||||||||||||||
type WizardPlugin = Plugin & { | ||||||||||||||||||||||||||
handledTags: string[]; | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The advantage is that we can enforce their definition, | ||||||||||||||||||||||||||
what we cannot do with a static functions as of now. | ||||||||||||||||||||||||||
Comment on lines
+181
to
+182
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean by "enforce their definition"? Who would do the enforcing, and how? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TypeScript would, wouldn't it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plugins don't need to be written using TypeScript at all, I've written them in straght JS before, but a plugin could just as well be written in ClojureScript or Elm, for example. Also, I think we currently don't enforce anything on plugins, the fact that they have to be ES Modules with an HTMLElement constructor as a default export is just a convention, just like not editing the DOM directly but using the Edit API, or having a run() method if you want to work in the menu. I think as long as we're in the JavaScript world, we can't really do more than come up with easy to follow and strong conventions, so documenting them is important. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. true, true. I might reformulate or remove it. Not sure yet |
||||||||||||||||||||||||||
The disadvantages is that we cannot define the tags dynamically | ||||||||||||||||||||||||||
Another neutral difference is that the handled tags definition is at | ||||||||||||||||||||||||||
the registration point and not in the plugin's static function. | ||||||||||||||||||||||||||
So it can happen that the plugin changes which tags it can handle | ||||||||||||||||||||||||||
but we forget to change its configuration. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### Alternatives of Requests | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
#### [wizard-event.ts ↗](https://github.com/ca-d/open-scd-core/blob/add-wizards/foundation/wizard-event.ts) by Christian Dinkel | ||||||||||||||||||||||||||
In this definition there is only one event (`oscd-wizard-request`) | ||||||||||||||||||||||||||
and two different event details (`CreateRequest` and `EditRequest`). | ||||||||||||||||||||||||||
This way the plugins need to determine themselves which | ||||||||||||||||||||||||||
event they got by examining each request. | ||||||||||||||||||||||||||
With two different events plugins can listen on one or both and can be sure | ||||||||||||||||||||||||||
which event they get without examining the event itself. | ||||||||||||||||||||||||||
Plugin developers may forget that they can get two different types of event details, | ||||||||||||||||||||||||||
but if we have two different events with always the same type of payload, | ||||||||||||||||||||||||||
there is nothing to forget. | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean forgetting in case wizard plugin developers do not look at the API and also choose not to use TypeScript? How likely do we think that case is? Do we want to design our API around it? Do you also see the advantage of more straightforward backwards-compatible API growth in the future with this approach? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So you have to type a event yourself when you set a listener. My thinking was that we don't have one "interaction" event and we have to decide depending on the event's structure if it was a |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
---- | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Prior Art | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The following documents influenced this ADR: | ||||||||||||||||||||||||||
- Wizarding API historical overview: https://github.com/openscd/open-scd/discussions/1230 | ||||||||||||||||||||||||||
- Finalize wizarding API: https://github.com/openscd/open-scd-wizarding/issues/1 | ||||||||||||||||||||||||||
- Wizarding Addon: https://wiki.lfenergy.org/display/SHP/Wizarding+Addon | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||
## Consequences | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- By providing a default or fallback wizard the plugins does not have to know if a wizard is available | ||||||||||||||||||||||||||
- With the wizarding API we need less deep linking between plugins | ||||||||||||||||||||||||||
- We can extract common functionality into smaller plugins | ||||||||||||||||||||||||||
- There will be more plugin that one have to maintain and install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this limited to SCL editing only? or could it e.g. also contain buttons for functions e.g. auto button e.g. Guess content:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would depend on the wizard's author what content id displayed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oke, any content will work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plug-in author will still be responsible on how the dialog looks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If by plug-in you mean the wizard-library plug-in, then yes. If you mean the plugin that calls the wizard, then no: The idea for the API that we've come up with throughout April 2022 is that the plugin sends a pure declaration of intent: in this case that would be "Please allow the user to create a Substation element in this SCL document!" and then the wizard library would be responsible for displaying some dialog that would allow the user to do that. That dialog, in our default wizard library, would look exactly as you have shown there, with the "Guess content" button. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thinking here. The Wizard-Plugins are 100% responsible of their visuals and content.