openscd / open-scd

A substation configuration description editor for projects using SCL IEC 61850-6 Edition 2 or greater
https://openscd.github.io
Apache License 2.0
93 stars 31 forks source link

Editor type plug-ins should be able to be rendered without a doc being present #1512

Open pascalwilbrink opened 3 months ago

pascalwilbrink commented 3 months ago

Currently only menu type plug-ins are supported to work without a doc being present. This should also be the case for editor type plug-ins.

Acceptance criteria

juancho0202 commented 3 months ago

After implementing this change in https://github.com/openscd/open-scd/pull/1530, the tests for packages/openscd/test/unit/Plugging.test.ts stop working specifically at "add custom plugin dialog". The tests neither pass or fail just become unresponsive.

I noticed that this goes away after undoing the adding of requireDoc: true to all editor type plugins in packages/openscd/src/plugins.ts but this change is now required for all editor type plugins to tell apart the ones that should appear initially at the landing screen.

Sander3003 commented 1 month ago

See the DRAFT pull-request; it can be fixed.