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
We are thinking about radically changing the WizardEvent in order to turn it into a pure declaration of intent.
Instead of the API user saying
"Please open a wizard with exactly these inputs, page titles, button labels, icons, etc., and exactly this WizardAction committed at the end.",
the API user would then either say
"Please open some wizard allowing the user to edit this element I have here."
or
"Please open some wizard allowing the user to create a new element of this tagName as a child of this parent element I have here."
In order to enable the API user to add properties from an extension namespace defined in some custom schema, the API user can specify pairs of XML Schema documents and namespace prefix strings to take into consideration. All other work would be done automatically by the core editor.
This would mean reducing the scope of Wizards to creating or editing elements only, while other tasks (e.g. our "select" wizards) would then be done using regular modal dialogues. This makes for a clean, single-purpose API with a clearly defined upgrade path when new versions of the standard schema are released.
If we implement modular wizard libraries in open-scd-core, we don't actually need to take care of extension namespaces in the API any more, since these can be handled in purpose-built wizards for the same element. This is an alternative API we could use at that point.
exportinterfaceWizardBase{subWizard?: boolean;}exportinterfaceCreateWizardextendsWizardBase{parent: Element;tagName: string;}exportinterfaceEditWizardextendsWizardBase{element: Element;}exporttypeWizard=CreateWizard|EditWizard;exportfunctionisCreateWizard(wizard: Wizard): wizard is CreateWizard{return'parent'inwizard;}exportfunctionisEditWizard(wizard: Wizard): wizard is EditWizard{return'element'inwizard;}exporttypeWizardEvent=CustomEvent<Wizard>;exportfunctionnewWizardEvent(wizard: Wizard): WizardEvent{returnnewCustomEvent<Wizard>('oscd-wizard',{composed: true,bubbles: true,detail: wizard,});}declare global {interfaceElementEventMap{['oscd-wizard']: WizardEvent;}}
We are thinking about radically changing the
WizardEvent
in order to turn it into a pure declaration of intent.Instead of the API user saying
the API user would then either say
or
In order to enable the API user to add properties from an extension namespace defined in some custom schema, the API user can specify pairs of XML Schema documents and namespace prefix strings to take into consideration. All other work would be done automatically by the core editor.
This would mean reducing the scope of Wizards to creating or editing elements only, while other tasks (e.g. our "select" wizards) would then be done using regular modal dialogues. This makes for a clean, single-purpose API with a clearly defined upgrade path when new versions of the standard schema are released.
The text was updated successfully, but these errors were encountered: